def get_operation(mode, property):

    prop = unicode(property)
    if (prop in OBJECT_DEFINITIONS and
        mode in OBJECT_DEFINITIONS[prop]):

        return OBJECT_DEFINITIONS[prop][mode]

    elif mode == "set" and prop.startswith("on") and len(prop) > 2:
        # We can't match all of them manually, so grab all the "on*" properties
        # and funnel them through the set_on_event function.

        return set_on_event
This returns the object definition function for a particular property
dataset/ETHPy150Open mozilla/app-validator/appvalidator/testcases/javascript/instanceproperties.py/get_operation