def METHOD_NAME(fo, T=SQLDumpTransformer, progress=True, lazy=True):
    """
    Read in and parse a SQL dump, with each row as a Python dictionary.
    If `lazy=True`, returns (total number of rows, iterator of rows)
    Otherwise, returns a list of rows.
    Set the `progess` option to False to disable the progress bar
    (there is no progress bar in lazy mode regardless).
    """
    contents = fo.read()
    if lazy:
        total_rows = sum(1 for _ in entry_regex.finditer(contents))
        gc.collect()
        return total_rows, map(lambda x: parse_row(x.group(), T), entry_regex.finditer(contents))
    else:
        matches = list(entry_regex.finditer(contents))
        return [parse_row(x.group(), T) for x in tqdm(matches, disable=(not progress))]