def sanitize_sequence(data):
 if (six.PY3 and isinstance(data, collections.abc.MappingView)):
  return list(data)
 return data

def sanitize_sequence ( data ) : if ( six . PY3 and isinstance ( data , collections . abc . MappingView ) ) : return list ( data ) return data
converts dictview object to list .