def split_reference_name(reference_name, at="_"):
    """
    Split reference_name at the first `at`.

    This returns the TE family name if the TEs are named "$ID_$NAME_$SUPERFAMILY".

    >>> split_reference_name('FBti0019298_rover_Gypsy')
    'rover'
    """
    if at in reference_name:
        return "_".join(reference_name.split(at)[1:-1])
    else:
        return reference_name