code: def prefix2ns(self, prefix: YangIdentifier, mid: ModuleId) -> YangIdentifier:
          
          try:
              mdata = self.modules[mid]
          except KeyError:
              raise ModuleNotRegistered(*mid) from None
          try:
              return mdata.prefix_map[prefix][0]
          except KeyError:
              raise UnknownPrefix(prefix, mid) from None
docs: Return the namespace corresponding to a prefix.
  
          Args:
              prefix: Prefix associated with a module and its namespace.
              mid: Identifier of the module in which the prefix is declared.
  
          Raises:
              ModuleNotRegistered: If `mid` is not registered in the data model.
              UnknownPrefix: If `prefix` is not declared.