def encode_meta_headers(headers):
 ret = {}
 for (header, value) in headers.items():
  value = encode_utf8(value)
  header = header.lower()
  if (isinstance(header, six.string_types) and header.startswith(USER_METADATA_TYPE)):
   header = encode_utf8(header)
  ret[header] = value
 return ret

def encode_meta_headers ( headers ) : ret = { } for ( header , value ) in headers . items ( ) : value = encode_utf8 ( value ) header = header . lower ( ) if ( isinstance ( header , six . string_types ) and header . startswith ( USER_METADATA_TYPE ) ) : header = encode_utf8 ( header ) ret [ header ] = value return ret
only encode metadata headers keys .