code: def test_create_artifact_metadata():
      path = tempfile.TemporaryDirectory().name
      runtime = "3.9"
      entrypoint = "test.py"
  
      # files don't exist yet
      metadata, requirements = _create_artifact_metadata(
          path, entrypoint, runtime
      )
      assert not metadata and not requirements
  
      os.makedirs(path)
      # path exists, no requirements, still should fail
      metadata, requirements = _create_artifact_metadata(
          path, entrypoint, runtime
      )
      assert not metadata and not requirements
  
      with open(os.path.join(path, "requirements.txt"), "w") as f:
          f.write("wandb\n")
  
      # basic case
      metadata, requirements = _create_artifact_metadata(
          path, entrypoint, runtime
      )
      assert metadata == {"python": runtime, "codePath": entrypoint}
      assert requirements == ["wandb"]
  
      # python picked up correctly
      metadata, requirements = _create_artifact_metadata(
          path, entrypoint
      )
      py = ".".join(get_current_python_version())
      assert metadata == {"python": py, "codePath": entrypoint}
      assert requirements == ["wandb"]
  
file_path: wandb/tests/pytest_tests/unit_tests/test_launch/test_create_job.py
imports: import json
  import os
  import platform
  import sys
  import tempfile
  import pytest
  from wandb.sdk.internal.job_builder import JobBuilder
  from wandb.sdk.launch.builder.build import get_current_python_version
  from wandb.sdk.launch.create_job import _configure_job_builder_for_partial, _create_artifact_metadata, _dump_metadata_and_requirements, _handle_artifact_entrypoint, _make_code_artifact_name
label_desc: Use image node_id 1 for calling a global function with example usage: test_create_artifact_metadata() without return types