code: def _attach_methods(cls, wrap_func, methods):
      try:
          module = importlib.import_module(cls._module_name)
  
          for method in methods:
              _f = getattr(module, method)
              if hasattr(cls, method):
                  raise ValueError(
                      "{0} already has '{1}' method".format(cls, method)
                  )
              func_name = cls._module_name + "." + method
              setattr(cls, method, wrap_func(_f, func_name))
  
      except ImportError:
          pass
  
file_path: pandas-ml/pandas_ml/core/accessor.py
imports: import importlib
  import pandas.compat
label_desc: Use image node_id 1 for calling a global function with example usage: _attach_methods(cls, wrap_func, methods) without return types