code: def integer(self, x):
          
          if type(x) is str:
              hex = binascii.unhexlify(x)
              return int.from_bytes(hex, 'big')
  
          return x.value if isinstance(x, FiniteField.Value) else x
docs: returns a plain integer