docs: def discover_indexes(self):
          """Save list of index builders into ``_index_builders``."""
          self.indexes = []
  
          for app_config in apps.get_app_configs():
              indexes_path = '{}.elastic_indexes'.format(app_config.name)
              try:
                  indexes_module = import_module(indexes_path)
  
                  for attr_name in dir(indexes_module):
                      attr = getattr(indexes_module, attr_name)
                      if inspect.isclass(attr) and issubclass(attr, BaseIndex) and attr is not BaseIndex:
                          # Make sure that parallel tests have different indices.
                          if is_testing():
                              index = attr.document_class._index._name  # pylint: disable=protected-access
                              testing_postfix = '_test_{}_{}'.format(TESTING_UUID, os.getpid())
  
                              if not index.endswith(testing_postfix):
                                  # Replace current postfix with the new one.
                                  if attr.testing_postfix:
                                      index = index[:-len(attr.testing_postfix)]
                                  index = index + testing_postfix
                                  attr.testing_postfix = testing_postfix
  
                              attr.document_class._index._name = index  # pylint: disable=protected-access
  
                          index = attr()
  
                          # Apply any extensions defined for the given index. Currently index extensions are
                          # limited to extending "mappings".
                          for extension in composer.get_extensions(attr):
                              mapping = getattr(extension, 'mapping', {})
                              index.mapping.update(mapping)
  
                          self.indexes.append(index)
              except ImportError as ex:
                  if not re.match('No module named .*elastic_indexes.*', str(ex)):
                      raise