code: def _bundle_from_module(self, module_object):
          
          try:
              # Get the module name
              module_object = module_object.__name__
          except AttributeError:
              # We got a string
              pass
  
          return self._framework.get_bundle_by_name(module_object)
docs: Find the bundle associated to a module
  
          :param module_object: A Python module object
          :return: The Bundle object associated to the module, or None