def rows_tag_from_rows(rows):
    """Generate a rows tag, to customize phase names based on the number of rows of data extracted in the fit,
    which is used to speed up serial CTI fits.

    This changes the phase name 'phase_name' as follows:

    rows = None -> phase_name
    rows = (0, 10) -> phase_name_rows_(0,10)
    rows = (20, 60) -> phase_name_rows_(20,60)
    """
    if rows == None:
        return ''
    else:
        x0 = str(rows[0])
        x1 = str(rows[1])
        return '_rows_(' + x0 + ',' + x1 + ')'
