docs: def parse(cls, trust_root):
          """
          This method creates a C{L{TrustRoot}} instance from the given
          input, if possible.
  
  
          @param trust_root: This is the trust root to parse into a
          C{L{TrustRoot}} object.
  
          @type trust_root: C{str}
  
  
          @return: A C{L{TrustRoot}} instance if trust_root parses as a
          trust root, C{None} otherwise.
  
          @rtype: C{NoneType} or C{L{TrustRoot}}
          """
          url_parts = _parseURL(trust_root)
          if url_parts is None:
              return None
  
          proto, host, port, path = url_parts
  
          # check for valid prototype
          if proto not in _protocols:
              return None
  
          # check for URI fragment
          if path.find('#') != -1:
              return None
  
          # extract wildcard if it is there
          if host.find('*', 1) != -1:
              # wildcard must be at start of domain:  *.foo.com, not foo.*.com
              return None
  
          if host.startswith('*'):
              # Starts with star, so must have a dot after it (if a
              # domain is specified)
              if len(host) > 1 and host[1] != '.':
                  return None
  
              host = host[1:]
              wilcard = True
          else:
              wilcard = False
  
          # we have a valid trust root
          tr = cls(trust_root, proto, wilcard, host, port, path)
  
          return tr