code: def namespace(self, mid: ModuleId) -> YangIdentifier:
          
          try:
              mdata = self.modules[mid]
          except KeyError:
              raise ModuleNotRegistered(*mid) from None
          return mdata.main_module[0]
docs: Return the namespace corresponding to a module or submodule.
  
          Args:
              mid: Module identifier.
  
          Raises:
              ModuleNotRegistered: If `mid` is not registered in the data model.