code: def _safe_getmodule(o):
      
      from inspect import getmodule
      try:
          return getmodule(o)
      except: # pragma: no cover
          #There is nothing we can do about this for now.
          msg.err("_safe_getmodule: {}".format(o), 2)
          pass
docs: Attempts to return the module in which `o` is defined.