<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def handler(param):
 """Decorator that associates a handler to an event class This decorator works for both methods and functions. Since it only registers the callable object and returns it without evaluating it. The name param should be informed in a dotted notation and should contain two informations: the django app name and the class name. Just like this: You can also use this same decorator to mark class methods as handlers. Just notice that the class *must* inherit from `BaseEvent`. """

    if isinstance(param, basestring):
        return lambda f: _register_handler(param, f)
    else:
        core.HANDLER_METHOD_REGISTRY.append(param)
        return param