class_docstr: Widget displaying an editable color gradient. The user may add, move, recolor,
  or remove colors from the gradient. Additionally, a context menu allows the 
  user to select from pre-defined gradients.
docstr: Set the orientation of the widget. May be one of 'bottom', 'top', 
  'left', or 'right'.
docstr_tok: ["Set","the","orientation","of","the","widget",".","May","be","one","of","'bottom","'",",","'top","'",",","'left","'",",","or","'right","'","."]
code: def setOrientation(self, ort):
      """Set the orientation of the widget. May be one of 'bottom', 'top',
      'left', or 'right'."""
      self.item.setOrientation(ort)
      self.orientation = ort
      self.setMaxDim()
  
file_path: pyqtgraph/pyqtgraph/widgets/GradientWidget.py
imports: from ..graphicsItems.GradientEditorItem import GradientEditorItem
  from ..Qt import QtCore, QtGui, QtWidgets
  from .GraphicsView import GraphicsView
label_desc: Use image node_id 2 for calling the GradientWidget obj's underlying member method code with example usage: obj.setOrientation(ort) without return types