<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def find_mapping(self, mapped_class):
 """ Returns the mapping registered for the given mapped class or any of its base classes. Returns `None` if no mapping can be found. :param mapped_class: mapped type :type mapped_class: type :returns: instance of :class:`Mapping` or `None` """

        if not self.__is_initialized:
            self.__is_initialized = True
            self._initialize()
        mapping = None
        for base_cls in mapped_class.__mro__:
            try:
                mapping = self.__mappings[base_cls]
            except KeyError:
                continue
            else:
                break
        return mapping