<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _interpretMdriztabPars(rec):
 """ Collect task parameters from the MDRIZTAB record and update the master parameters list with those values Note that parameters read from the MDRIZTAB record must be cleaned up in a similar way that parameters read from the user interface are. """

    tabdict = {}
    # for each entry in the record...
    for indx in range(len(rec.array.names)):
        # ... get the name, format, and value.
        _name = rec.array.names[indx]
        _format = rec.array.formats[indx]
        _value = rec.field(_name)

        # Translate names from MDRIZTAB columns names to
        # input parameter names found in IRAF par file.
        #
        #if _name.find('final') > -1: _name = 'driz_'+_name
        if _name in ['shiftfile','mdriztab']:
            continue
        drizstep_names = ['driz_sep_','final_']
        if _name in ['refimage','bits']:
            for dnames in drizstep_names:
                tabdict[dnames+_name] = _value
            continue
        if _name in ['driz_sep_bits','final_bits']:
            tabdict[_name] = str(_value)
            continue
        if _name == 'coeffs':
            _val = True
            if _value in ['INDEF',None,"None",'',' ']: _val = False
            tabdict[_name] = _val
            continue

        par_table = {'subsky':'skysub','crbitval':'crbit','readnoise':'rdnoise'}
        if _name in par_table:
            _name = par_table[_name]

        # We do not care about the first two columns at this point
        # as they are only used for selecting the rows
        if _name != 'filter' and _name != 'numimages':
            # start by determining the format type of the parameter
            _fmt = findFormat(_format)

            # Based on format type, apply proper conversion/cleaning
            if (_fmt == 'a') or (_fmt == 'A'):
                _val = cleanBlank(_value)
                if _val is None:
                    _val = ''

            elif (_format == 'i1') or (_format=='1L'):
                _val = toBoolean(_value)

            elif (_format == 'i4') or (_format == '1J'):
                _val = cleanInt(_value)

            elif ('E' in _format) or (_format == 'f4') :
                _val = cleanNaN(_value)

            else:
                print('MDRIZTAB column ',_name,' has unrecognized format',_format)
                raise ValueError
            if _name in ['ra','dec']:
                for dnames in drizstep_names:
                    tabdict[dnames+_name] = _val

            else:
                tabdict[_name] = _val

    return tabdict