code: def _get_retries(self, node):
      max_user_code_retries = 0
      max_error_retries = 0
      foreach_default_retry = 1
      # Different decorators may have different retrying strategies, so take
      # the max of them.
      for deco in node.decorators:
          (
              user_code_retries,
              error_retries,
          ) = deco.step_task_retry_count()
          max_user_code_retries = max(
              max_user_code_retries, user_code_retries
          )
          max_error_retries = max(max_error_retries, error_retries)
      parent_is_foreach = (
          any(  # The immediate parent is a foreach node.
              self.graph[n].type == "foreach" for n in node.in_funcs
          )
      )
  
      if parent_is_foreach:
          max_user_code_retries + foreach_default_retry
      return (
          max_user_code_retries,
          max_user_code_retries + max_error_retries,
      )
  
imports: import json
  import os
  import random
  import string
  import sys
  from datetime import datetime, timedelta
  from io import BytesIO
  import metaflow.util
  from metaflow import current
  from metaflow.decorators import flow_decorators
  from metaflow.exception import MetaflowException
  from metaflow.includefile import FilePathClass
  from metaflow.metaflow_config import AIRFLOW_KUBERNETES_CONN_ID, AIRFLOW_KUBERNETES_KUBECONFIG_CONTEXT, AIRFLOW_KUBERNETES_KUBECONFIG_FILE, AIRFLOW_KUBERNETES_STARTUP_TIMEOUT_SECONDS, AWS_SECRETS_MANAGER_DEFAULT_REGION, AZURE_STORAGE_BLOB_SERVICE_ENDPOINT, CARD_AZUREROOT, CARD_GSROOT, CARD_S3ROOT, DATASTORE_SYSROOT_AZURE, DATASTORE_SYSROOT_GS, DATASTORE_SYSROOT_S3, DATATOOLS_S3ROOT, DEFAULT_SECRETS_BACKEND_TYPE, KUBERNETES_SECRETS, KUBERNETES_SERVICE_ACCOUNT, S3_ENDPOINT_URL, SERVICE_HEADERS, SERVICE_INTERNAL_URL
  from metaflow.metaflow_config_funcs import config_values
  from metaflow.parameters import DelayedEvaluationParameter, JSONTypeClass, deploy_time_eval
  from metaflow.plugins.cards.card_modules import chevron
  from metaflow.plugins.kubernetes.kubernetes import Kubernetes
  from metaflow.plugins.timeout_decorator import get_run_time_limit_for_task
  from metaflow.util import compress_list, dict_to_cli_options, get_username
  from .None import airflow_utils
  from .airflow_utils import AIRFLOW_MACROS, TASK_ID_XCOM_KEY, AirflowTask, Workflow
  from .exception import AirflowException
  from .sensors import SUPPORTED_SENSORS
label_desc: Use image node_id 6 for calling the Airflow obj's underlying member method code with example usage: obj._get_retries(node) and returns: max_user_code_retries,  unknown