code: def pytest_generate_tests(metafunc):
      device_names = None
      dtype_names = None
      if "device_name" in metafunc.fixturenames:
          raw_value = metafunc.config.getoption("--device")
          if raw_value == "all":
              device_names = list(TEST_DEVICES.keys())
          else:
              device_names = raw_value.split(",")
      if "dtype_name" in metafunc.fixturenames:
          raw_value = metafunc.config.getoption("--dtype")
          if raw_value == "all":
              dtype_names = list(TEST_DTYPES.keys())
          else:
              dtype_names = raw_value.split(",")
      if device_names is not None and dtype_names is not None:
          # Exclude any blacklisted device/dtype combinations.
          params = [
              combo
              for combo in product(device_names, dtype_names)
              if combo not in DEVICE_DTYPE_BLACKLIST
          ]
          metafunc.parametrize("device_name,dtype_name", params)
      elif device_names is not None:
          metafunc.parametrize("device_name", device_names)
      elif dtype_names is not None:
          metafunc.parametrize("dtype_name", dtype_names)
  
imports: import sys
  from itertools import product
  from typing import Dict
  import numpy
  import pytest
  import torch
  import kornia
  from kornia.utils._compat import torch_version
label_desc: Use image node_id 6 for calling a global function with example usage: pytest_generate_tests(metafunc) without return types