def default_sid_function(id, rsid):
    """
    The default function for turning a Bgen (SNP) id and rsid into a
    :attr:`pysnptools.distreader.DistReader.sid`.
    If the Bgen rsid is '' or '0', the sid will be the (SNP) id.
    Otherwise, the sid will be 'ID,RSID'

    >>> default_sid_function('SNP1','rs102343')
    'SNP1,rs102343'
    >>> default_sid_function('SNP1','0')
    'SNP1'
    """
    if rsid == "0" or rsid == "":
        return id
    else:
        return id + "," + rsid