code: def prefix_to_url(self, id):
          '''prefix_to_url
  
          High-level api: Convert an identifier from `prefix:tagname` notation to
          `{namespace}tagname` notation. If the identifier does not have a
          prefix, it is assumed that the whole identifier is a tag name.
  
          Parameters
          ----------
  
          id : `str`
              Identifier in `prefix:tagname` notation.
  
          Returns
          -------
  
          str
              Identifier in `{namespace}tagname` notation.
          '''
  
          parts = id.split(':')
          if len(parts) > 1:
              return '{' + self.prefixes[parts[0]] + '}' + parts[1]
          else:
              return '{' + self.url + '}' + if prefix_to_url(self, id):
          '''prefix_to_url
  
          High-level api: Convert an identifier from `prefix:tagname` notation to
          `{namespace}tagname` notation. If the identifier does not have a
          prefix, it is assumed that the whole identifier is a tag name.
  
          Parameters
          ----------
  
          id : `str`
              Identifier in `prefix:tagname` notation.
  
          Returns
          -------
  
          str
              Identifier in `{namespace}tagname` notation.
          '''
  
          parts = id.split(':')
          if len(parts) > 1:
              return '{' + self.prefixes[parts[0]] + '}' + parts[1]
          else:
              return '{' + self.url + '}' + id
docs: prefix_to_url
  
          High-level api: Convert an identifier from `prefix:tagname` notation to
          `{namespace}tagname` notation. If the identifier does not have a
          prefix, it is assumed that the whole identifier is a tag name.
  
          Parameters
          ----------
  
          id : `str`
              Identifier in `prefix:tagname` notation.
  
          Returns
          -------
  
          str
              Identifier in `{namespace}tagname` notation.