code: def resolve_dag_name(name):
      project = current.get("project_name")
      is_project = False
  
      if project:
          is_project = True
          if name:
              raise MetaflowException(
                  "--name is not supported for @projects. "
                  "Use --branch instead."
              )
          dag_name = current.project_flow_name
          if dag_name and VALID_NAME.search(dag_name):
              raise MetaflowException(
                  "Name '%s' contains invalid characters. Please construct a name using regex %s"
                  % (dag_name, VALID_NAME.pattern)
              )
          project_branch = to_bytes(
              ".".join((project, current.branch_name))
          )
          token_prefix = (
              "mfprj-%s"
              % to_unicode(
                  base64.b32encode(sha1(project_branch).digest())
              )[:16]
          )
      else:
          if name and VALID_NAME.search(name):
              raise MetaflowException(
                  "Name '%s' contains invalid characters. Please construct a name using regex %s"
                  % (name, VALID_NAME.pattern)
              )
          dag_name = name if name else current.flow_name
          token_prefix = dag_name
      return dag_name, token_prefix.lower(), is_project
  
imports: import base64
  import os
  import re
  import sys
  from hashlib import sha1
  from metaflow import current, decorators
  from metaflow._vendor import click
  from metaflow.exception import MetaflowException, MetaflowInternalError
  from metaflow.package import MetaflowPackage
  from metaflow.plugins.aws.step_functions.production_token import load_token, new_token, store_token
  from metaflow.plugins.kubernetes.kubernetes_decorator import KubernetesDecorator
  from metaflow.util import get_username, to_bytes, to_unicode
  from .airflow import Airflow
  from .exception import AirflowException, NotSupportedException
label_desc: Use image node_id 8 for calling a global function with example usage: resolve_dag_name(name) and returns: dag_name,  token_prefix,  is_project