code: def test_coverage():
      cpu_tests = set(
          (e if isinstance(e, str) else e.values[0]).split()[0]
          for e in CPU_EXAMPLES
      )
      cuda_tests = set(
          (e if isinstance(e, str) else e.values[0]).split()[0]
          for e in CUDA_EXAMPLES
      )
      jit_tests = set(
          (e if isinstance(e, str) else e.values[0]).split()[0]
          for e in JIT_EXAMPLES
      )
      for root, dirs, files in os.walk(EXAMPLES_DIR):
          for basename in files:
              if not basename.endswith(".py"):
                  continue
              path = os.path.join(root, basename)
              with open(path) as f:
                  text = f.read()
              example = os.path.relpath(path, EXAMPLES_DIR)
              if "__main__" in text:
                  if example not in cpu_tests:
                      pytest.fail(
                          "Example: {} not covered in CPU_EXAMPLES.".format(
                              example
                          )
                      )
                  if "--cuda" in text and example not in cuda_tests:
                      pytest.fail(
                          "Example: {} not covered by CUDA_EXAMPLES.".format(
                              example
                          )
                      )
                  if "--jit" in text and example not in jit_tests:
                      pytest.fail(
                          "Example: {} not covered by JIT_EXAMPLES.".format(
                              example
                          )
                      )
  
file_path: pyro/tests/test_examples.py
imports: import logging
  import os
  import sys
  from subprocess import check_call
  import pytest
  import torch
  from tests.common import EXAMPLES_DIR, requires_cuda, requires_funsor, requires_horovod, requires_lightning, xfail_param
label_desc: Use image node_id 2 for calling a global function with example usage: test_coverage() without return types