code: def to_long(x):
      
      if isinstance(x, long):
          return x
      elif isinstance(x, int):
          return long(x)
      else:
          return bytes_to_long(to_bytes(x))
docs: Converts input to a long number (arbitrary precision python long)
      :param x:
      :return: