code: def pad_hex(long_int):
      
      if not isinstance(long_int, six.string_types):
          hash_str = long_to_hex(long_int)
      else:
          hash_str = long_int
      if len(hash_str) % 2 == 1:
          hash_str = '0%s' % hash_str
      elif hash_str[0] in '89ABCDEFabcdef':
          hash_str = '00%s' % hash_str
      return hash_str
docs: Converts a Long integer (or hex string) to hex format padded with zeroes for hashing
      :param {Long integer|String} long_int Number or string to pad.
      :return {String} Padded hex string.