def _xcom_pull(task, key="return_value"):
  """Generates a Jinja template that pulls an XCom variable for a task.
     XCom allows data to be shared between different tasks.
  Args:
    task: The task instance.
    key: The XCom key to retrieve the value for. (default: return_value)
  Returns:
    The Jinja template representation of the XCom variable.
  """
  return "{{ task_instance.xcom_pull('%s', key='%s') }}" % (task.task_id, key)