code: def find_cpmodule(m):
      """Returns the CPModule from within the loaded Python module
  
      m - an imported module
  
      returns the CPModule class
      """
      modulename = os.path.splitext(os.path.basename(m.__file__))[0]
      for key, item in list(m.__dict__.items()):
          if key.lower() == modulename and issubclass(item, Module):
              return item
      raise ValueError(
          "Could not find cellprofiler_core.module.Module class in %s"
          % m.__file__
      )
  
file_path: CellProfiler/src/subpackages/core/cellprofiler_core/utilities/core/modules/__init__.py
imports: import logging
  import os
  import re
  import sys
  from ....module import Module
  from ....constants.modules import do_not_override, should_override, all_modules, svn_revisions, pymodules, badmodules, builtin_modules, renamed_modules, unimplemented_modules, depricated_modules, replaced_modules
  from ..plugins import load_plugins
label_desc: Use image node_id 2 for calling a global function with example usage: find_cpmodule(m) and returns: item