def _dispatch_deserializer(ds, node, parentPref, prefFactory, basedir=None,
    chainNotifications=0):
    """Find out which deserializer function should
    handle deserializing a particular node."""
    dsfunname = u'_ds_' + node.nodeName
    if hasattr(ds, dsfunname):
        getattr(ds, dsfunname)(node, parentPref, basedir)
    else:
        pref = prefFactory.deserializeNode(node, parentPref, basedir,
            chainNotifications)
        return pref
