'Attempts to match the imported model\'s fields to the
titles of the parsed CSV file, if the file is supposed to have
headers.
Will consume the first line of the ``rows`` iterator.
Returns a pair of (None, None) if headers were not requested
or the list of headers and a dict mapping cell indices
to key paths in the ``fields`` tree
:param Iterator rows:
:param dict fields:
:param dict options:
:rtype: (None, None) | (list(str), dict(int: list(str)))'

def _match_headers(self, rows, fields, options):

    if (not options.get('headers')):
        return (None, None)
    headers = next(rows)
    return (headers, {index: ([field['name'] for field in self._match_header(header, fields, options)] or None) for (index, header) in enumerate(headers)})
