code: def test_dump_metadata_and_requirements():
      path = tempfile.TemporaryDirectory().name
      metadata = {"testing": "123"}
      requirements = ["wandb", "optuna"]
  
      _dump_metadata_and_requirements(path, metadata, requirements)
  
      assert os.path.exists(os.path.join(path, "requirements.txt"))
      assert os.path.exists(os.path.join(path, "wandb-metadata.json"))
  
      with open(os.path.join(path, "requirements.txt")) as f:
          assert f.read().strip().splitlines() == requirements
  
      m = json.load(open(os.path.join(path, "wandb-metadata.json")))
      assert metadata == m
  
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 5 for calling a global function with example usage: test_dump_metadata_and_requirements() without return types