def _replacer(data, key):
 if (not isinstance(key, six.string_types)):
  return key
 try:
  return sanitize_sequence(data[key])
 except KeyError:
  return key

def _replacer ( data , key ) : if ( not isinstance ( key , six . string_types ) ) : return key try : return sanitize_sequence ( data [ key ] ) except KeyError : return key
replace a number with its hexadecimal representation .