<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def read(filename, custom_field_map=None, index_order='F'):
 """Read a NRRD file and return the header and data See :ref:`user-guide:Reading NRRD files` for more information on reading NRRD files. .. note:: Users should be aware that the `index_order` argument needs to be consistent between `nrrd.read` and `nrrd.write`. I.e., reading an array with `index_order='F'` will result in a transposed version of the original data and hence the writer needs to be aware of this. Parameters filename : :class:`str` Filename of the NRRD file custom_field_map : :class:`dict` (:class:`str`, :class:`str`), optional Dictionary used for parsing custom field types where the key is the custom field name and the value is a string identifying datatype for the custom field. index_order : {'C', 'F'}, optional Specifies the index order of the resulting data array. Either 'C' (C-order) where the dimensions are ordered from slowest-varying to fastest-varying (e.g. (z, y, x)), or 'F' (Fortran-order) where the dimensions are ordered from fastest-varying to slowest-varying (e.g. (x, y, z)). Returns ------- data : :class:`numpy.ndarray` Data read from NRRD file header : :class:`dict` (:class:`str`, :obj:`Object`) Dictionary containing the header fields and their corresponding parsed value See Also -------- :meth:`write`, :meth:`read_header`, :meth:`read_data` """


    """Read a NRRD file and return a tuple (data, header)."""
    with open(filename, 'rb') as fh:
        header = read_header(fh, custom_field_map)
        data = read_data(header, fh, filename, index_order)

    return data, header