class_docstr: Accessor to related functionalities.
class_docstr_tok: ["Accessor","to","related","functionalities","."]
code: def __init__(self, df, module_name=None, attrs=None):
      self._df = df
  
      if module_name is not None:
          # overwrite if exists
          self._module_name = module_name
  
      if self._module_name is None:
          return
  
      self._module = importlib.import_module(self._module_name)
  
      if attrs is None:
          try:
              attrs = self._module_attrs
          except AttributeError:
              pass
      if attrs is None:
          try:
              attrs = self._module.__all__
          except AttributeError:
              pass
      if attrs is None:
          return
  
      for mobj in attrs:
          try:
              if not hasattr(self, mobj):
                  try:
                      setattr(self, mobj, getattr(self._module, mobj))
                  except AttributeError:
                      pass
  
          except NotImplementedError:
              pass
  
file_path: pandas-ml/pandas_ml/core/accessor.py
imports: import importlib
  import pandas.compat
label_desc: Use image node_id 1 to create a new _AccessorMethods object from inherited base classes: object with example: obj = _AccessorMethods(df, module_name, attrs)