<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def register_lookup(cls, lookup, lookup_name=None):
 """Register a Lookup to a class"""

        if lookup_name is None:
            lookup_name = lookup.lookup_name
        if 'class_lookups' not in cls.__dict__:
            cls.class_lookups = {}

        cls.class_lookups[lookup_name] = lookup
        cls._clear_cached_lookups()

        return lookup