code: def get_object_executor(obj, green_mode=None):
      
      # Get green mode
      if green_mode is None:
          green_mode = get_object_green_mode(obj)
      # Get executor
      executor = None
      if hasattr(obj, '_executors'):
          executor = obj._executors.get(green_mode, None)
      if executor is None:
          executor = get_executor(green_mode)
      # Get submitter
      return executor
docs: Returns the proper executor for the given object.
  
      If the object has *_executors* and *_green_mode* members it returns
      the submit callable for the executor corresponding to the green_mode.
      Otherwise it returns the global executor for the given green_mode.
  
      Note: *None* is a valid object.
  
      :returns: submit callable