code: def test_inspect_metric(path, tmp_path):
      inspect_metric(path, tmp_path)
      script_name = path + ".py"
      assert script_name in os.listdir(tmp_path)
      assert "__pycache__" not in os.listdir(tmp_path)
  
file_path: datasets/tests/test_inspect.py
imports: import os
  from pathlib import Path
  import pytest
  from datasets.inspect import get_dataset_config_info, get_dataset_config_names, get_dataset_default_config_name, get_dataset_infos, get_dataset_split_names, inspect_dataset, inspect_metric
  from datasets.packaged_modules.csv import csv
label_desc: Use image node_id 2 for calling a global function with example usage: test_inspect_metric(path, tmp_path) without return types