def parse_repeat(unparsed_rep):
    """Parse a repeat returning it as a single item or a list as appropriate."""
    if ',' in unparsed_rep:
        repeat = unparsed_rep.split(',')
    elif unparsed_rep.isnumeric():
        repeat = int(unparsed_rep)
    else:
        repeat = unparsed_rep
    return repeat