code: def module(self):
          
          if self._module is None:
              root = self
              while self._module is None and root is not None:
                  if isinstance(root, Module):
                      self._module = root
                  else:
                      root = root.parent
  
          return self._module
docs: Returns the module that this code element belongs to.