code: def from_text(text):
      
  
      if text.isdigit():
          v = int(text)
          if v >= 0 and v <= 4095:
              return v
      v = _by_text.get(text.upper())
      if v is None:
          raise UnknownRcode
      return v
docs: Convert text into an rcode.
  
      @param text: the texual rcode
      @type text: string
      @raises UnknownRcode: the rcode is unknown
      @rtype: int