<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def gene_name(st, exclude=("ev",), sep="."):
 """ Helper functions in the BLAST filtering to get rid alternative splicings. This is ugly, but different annotation groups are inconsistent with respect to how the alternative splicings are named. Mostly it can be done by removing the suffix, except for ones in the exclude list. """

    if any(st.startswith(x) for x in exclude):
        sep = None
    st = st.split('|')[0]

    if sep and sep in st:
        name, suffix = st.rsplit(sep, 1)
    else:
        name, suffix = st, ""

    # We only want to remove suffix that are isoforms, longer suffix would
    # suggest that it is part of the right gene name
    if len(suffix) != 1:
        name = st

    return name