def is_synapse_id(obj):
    if isinstance(obj, six.string_types):
        m = re.match(r'(syn\d+)', obj)
        if m:
            return m.group(1)
    return None
If the input is a Synapse ID return it, otherwise return None
dataset/ETHPy150Open Sage-Bionetworks/synapsePythonClient/synapseclient/utils.py/is_synapse_id