code: def i2osp(x, x_len):
      '''Converts the integer x to its big-endian representation of length
         x_len.
      '''
      if x > 256**x_len:
          raise exceptions.IntegerTooLarge
      h = hex(x)[2:]
      if h[-1] == 'L':
          h = h[:-1]
      if len(h) & 1 == 1:
          h = '0%s' % h
      x = binascii.unhexlify(h)
      return b'\x00' * int(x_len-len(x)) + f i2osp(x, x_len):
      '''Converts the integer x to its big-endian representation of length
         x_len.
      '''
      if x > 256**x_len:
          raise exceptions.IntegerTooLarge
      h = hex(x)[2:]
      if h[-1] == 'L':
          h = h[:-1]
      if len(h) & 1 == 1:
          h = '0%s' % h
      x = binascii.unhexlify(h)
      return b'\x00' * int(x_len-len(x)) + x
docs: Converts the integer x to its big-endian representation of length
         x_len.