def add_line_numbers(lines, start=0, fn=None):
    """Prefix lines with numbers.

    Parameters
    ----------
    lines : list or list-like of str
        Lines to be prefixed with a number.
    start : int, optional
        The index at which line numbers start (default is 0).
    fn : str, optional
        File name to prepend to line number (default is None).

    Returns
    -------
    list
        Lines prefixed with numbers.

    """
    if fn:
        fmt_string = '[{fn}-{{ln}}] {{line}}'.format(fn=fn)
    else:
        fmt_string = '[{ln}] {line}'

    with_prefix = []
    for line_no, line in enumerate(lines, start):
        with_prefix.append(fmt_string.format(ln=line_no, line=line))

    return with_prefix