code: def is_action(task):
      
      result = False
      if _extract_from_env_in_payload(task, 'ACTION_CALLBACK'):
          result = True
      if task.get('extra', {}).get('action') is not None:
          result = True
      return result
docs: Determine if a task is an action task.
  
      Trusted decision and action tasks are important in that they can generate
      other valid tasks. The verification of decision and action tasks is slightly
      different, so we need to be able to tell them apart.
  
      This checks for the following things::
  
          * ``task.payload.env.ACTION_CALLBACK`` exists
          * ``task.extra.action`` exists
  
      Args:
          task (dict): the task definition to check
  
      Returns:
          bool: True if it's an action