def sbaseref(sref):
    """ Formats the SBaseRef

    :param sref:
    :return:
    """
    if sref.isSetPortRef():
        return 'portRef={}'.format(sref.getPortRef())
    elif sref.isSetIdRef():
        return 'idRef={}'.format(sref.getIdRef())
    elif sref.isSetUnitRef():
        return 'unitRef={}'.format(sref.getUnitRef())
    elif sref.isSetMetaIdRef():
        return 'metaIdRef={}'.format(sref.getMetaIdRef())
    return ''
