<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(self, cls):
 """Adds a new PolymorphicIndexable to the registry."""

        doc_type = cls.search_objects.mapping.doc_type

        self.all_models[doc_type] = cls
        base_class = cls.get_base_class()
        if base_class not in self.families:
            self.families[base_class] = {}
        self.families[base_class][doc_type] = cls

        if cls.search_objects.mapping.index not in self.indexes:
            self.indexes[cls.search_objects.mapping.index] = []

        self.indexes[cls.search_objects.mapping.index].append(cls)