code: def lookup_cores(
      node_type_id, n_workers, node_to_core_mapping=node_to_core_mapping
  ):
      cores_per_node = node_to_core_mapping[node_type_id]
      total_cores = cores_per_node * n_workers
      return total_cores
  
file_path: glow/docs/source/_static/zzz_GENERATED_NOTEBOOK_SOURCE/2_setup_metadata.py
imports: import pyspark.sql.functions
  from pyspark.sql.types import *
  from databricks_cli.sdk.service import JobsService
  from databricks_cli.sdk.service import ClusterService
  from databricks_cli.configure.config import _get_api_client
  from databricks_cli.configure.provider import get_config
  from pathlib import Path
label_desc: Use image node_id 1 for calling a global function with example usage: lookup_cores(node_type_id, n_workers, node_to_core_mapping) and returns: total_cores