def vep_csq(csq, alt, alts):
    """
    >>> csq = 'intron_variant|||ENSG00000047056|WDR37|ENST00000263150||||-/494|protein_coding|1,downstream_gene_variant|||ENSG00000047056|WDR37|ENST00000436154||||-/209|protein_coding|1,intron_variant|||ENSG00000047056|WDR37|ENST00000358220||||-/494|protein_coding|1,stop_lost|Tga/Cga|*/R|ENSG00000047056|WDR37|ENST00000381329|9/9|||250/249|protein_coding|1'
    >>> vep_csq(csq, 'T', 'T') == csq
    True
    >>> vep_csq(csq, 'T', ['T', 'A']) == csq
    True

    >>> vep_csq(csq, 'A', ['T', 'A']) == ''
    True
    >>> extra = csq.split(",")[-1]

    # change its source
    >>> extra = extra[:-1] + "2"
    >>> vep_csq(csq + "," + extra, 'A', ['T', 'A']) == extra
    True
    >>> vep_csq(csq + "," + extra, 'T', ['T', 'A']) == csq
    True
    """

    csq = csq.split(',')
    idx = str(alts.index(alt) + 1)
    subset = [c for c in csq if c.split('|')[-1] == idx]
    return ",".join(subset)