code: def check_dir(module, module_name=None):
      """Returns a mapping of all objects with the wrong __module__ attribute."""
      if module_name is None:
          module_name = module.__name__
      results = {}
      for name in dir(module):
          item = getattr(module, name)
          if (
              hasattr(item, "__module__")
              and hasattr(item, "__name__")
              and item.__module__ != module_name
          ):
              results[name] = item.__module__ + "." + item.__name__
      return results
  
imports: import sys
  import sysconfig
  import subprocess
  import pkgutil
  import types
  import importlib
  import warnings
  import numpy
  import numpy
  import pytest
  from numpy.testing import IS_WASM
label_desc: Use image node_id 1 for calling a global function with example usage: check_dir(module, module_name) and returns: results