def get_clinvar_accession_from_clinvarset(elem):
    """
    Gets the Clinvar accession from a ClinVarSet element

    :param elem: ClinVarSet Element
    :return: ClinVar Accession
    """
    ## elem.xpath("//ClinVarAccession")[0].attrib['Acc'] ## this only works sometimes
    try:
        # return elem.xpath("//ClinVarAccession")[0].attrib['Acc'] ## this only works sometimes
        out = elem.find("ReferenceClinVarAssertion").find("ClinVarAccession").attrib['Acc']
        if out is None:
            out = ''
        return out
    except:
        return ''