code: def from_text(text):
      
  
      value = _by_text.get(text.upper())
      if value is None:
          match = _unknown_type_pattern.match(text)
          if match == None:
              raise UnknownRdatatype
          value = int(match.group(1))
          if value < 0 or value > 65535:
              raise ValueError("type must be between >= 0 and <= 65535")
      return value
docs: Convert text into a DNS rdata type value.
      @param text: the text
      @type text: string
      @raises dns.rdatatype.UnknownRdatatype: the type is unknown
      @raises ValueError: the rdata type value is not >= 0 and <= 65535
      @rtype: int