code: def from_text(text):
      
  
      if text.isdigit():
          value = int(text)
          if value >= 0 and value <= 15:
              return value
      value = _by_text.get(text.upper())
      if value is None:
          raise UnknownOpcode
      return value
docs: Convert text into an opcode.
  
      @param text: the textual opcode
      @type text: string
      @raises UnknownOpcode: the opcode is unknown
      @rtype: int