code: def task_finished(
      self,
      step_name,
      flow,
      graph,
      is_task_ok,
      retry_count,
      max_user_code_retries,
  ):
      # This will pass the xcom when the task finishes.
      xcom_values = {
          TASK_ID_XCOM_KEY: os.environ["METAFLOW_AIRFLOW_TASK_ID"],
      }
      if graph[step_name].type == "foreach":
          xcom_values[
              FOREACH_CARDINALITY_XCOM_KEY
          ] = flow._foreach_num_splits
      push_xcom_values(xcom_values)
  
file_path: metaflow/metaflow/plugins/airflow/airflow_decorator.py
imports: import json
  import os
  from metaflow.decorators import StepDecorator
  from metaflow.metadata import MetaDatum
  from .airflow_utils import TASK_ID_XCOM_KEY, FOREACH_CARDINALITY_XCOM_KEY
label_desc: Use image node_id 2 for calling the AirflowInternalDecorator obj's underlying member method code with example usage: obj.task_finished(step_name, flow, graph, is_task_ok, retry_count, max_user_code_retries) without return types