<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_mrz(file, save_roi=False, extra_cmdline_params=''):
 """The main interface function to this module, encapsulating the recognition pipeline. Given an image filename, runs MRZPipeline on it, returning the parsed MRZ object. :param file: A filename or a stream to read the file data from. :param save_roi: when this is True, the .aux['roi'] field will contain the Region of Interest where the MRZ was parsed from. :param extra_cmdline_params:extra parameters to the ocr.py """

    p = MRZPipeline(file, extra_cmdline_params)
    mrz = p.result

    if mrz is not None:
        mrz.aux['text'] = p['text']
        if save_roi:
            mrz.aux['roi'] = p['roi']
    return mrz