code: def _create_artifact_metadata(
      path: str, entrypoint: str, runtime: Optional[str] = None
  ) -> Tuple[Dict[str, Any], List[str]]:
      if not os.path.exists(path):
          wandb.termerror("Path must be a valid file or directory")
          return {}, []
  
      if not os.path.exists(os.path.join(path, "requirements.txt")):
          wandb.termerror(
              f"Could not find requirements.txt file in: {path}"
          )
          return {}, []
  
      # read local requirements.txt and dump to temp dir for builder
      requirements = []
      with open(os.path.join(path, "requirements.txt")) as f:
          requirements = f.read().splitlines()
  
      if runtime:
          python_version = _clean_python_version(runtime)
      else:
          python_version = ".".join(get_current_python_version())
  
      metadata = {"python": python_version, "codePath": entrypoint}
      return metadata, requirements
  
imports: import json
  import logging
  import os
  import sys
  import tempfile
  from typing import Any, Dict, List, Optional, Tuple
  import wandb
  from wandb.apis.internal import Api
  from wandb.sdk.artifacts.artifact import Artifact
  from wandb.sdk.internal.job_builder import JobBuilder
  from wandb.sdk.launch.builder.build import get_current_python_version
  from wandb.sdk.launch.git_reference import GitReference
  from wandb.sdk.launch.utils import _is_git_uri
  from wandb.sdk.lib import filesystem
  from wandb.util import make_artifact_name_safe
label_desc: Use image node_id 5 for calling a global function with example usage: _create_artifact_metadata(path, entrypoint, runtime) and returns: metadata,  requirements, dict,  list, dict,  list