code: def test_module_imports_are_direct():
      my_filename = abspath(inspect.getfile(inspect.currentframe()))
      my_dirname = dirname(my_filename)
      diagnose_imports_filename = join(
          my_dirname, "diagnose_imports.py"
      )
      diagnose_imports_filename = normpath(diagnose_imports_filename)
  
      process = subprocess.Popen(
          [
              sys.executable,
              normpath(diagnose_imports_filename),
              "--problems",
              "--by-importer",
          ],
          stdout=subprocess.PIPE,
          stderr=subprocess.STDOUT,
          bufsize=-1,
      )
      output, _ = process.communicate()
      assert output == "", (
          "There are import problems:\n" + output.decode()
      )
  
imports: import subprocess
  import sys
  from os.path import abspath, dirname, join, normpath
  import inspect
  from sympy.testing.pytest import XFAIL
label_desc: Use image node_id 1 for calling a global function with example usage: test_module_imports_are_direct() without return types