code: def orientation(self, value):
          
          allowed_values = ['LANDSCAPE', 'PORTRAIT']
          if value.upper() in allowed_values:
              self.execute(Command.SET_SCREEN_ORIENTATION, {'orientation': value})
          else:
              raise WebDriverException("You can only set the orientation to 'LANDSCAPE' and 'PORTRAIT'")
docs: Sets the current orientation of the device
  
          :Args:
           - value: orientation to set it to.
  
          :Usage:
              ::
  
                  driver.orientation = 'landscape'