docs: def get_extension_classes(sort, extra_extension_paths=None):
      """
      Banana banana
      """
      all_classes = {}
      deps_map = {}
  
      for entry_point in pkg_resources.iter_entry_points(
              group='hotdoc.extensions', name='get_extension_classes'):
          if entry_point.module_name == 'hotdoc_c_extension.extensions':
              continue
          try:
              activation_function = entry_point.load()
              classes = activation_function()
          # pylint: disable=broad-except
          except Exception as exc:
              info("Failed to load %s" % entry_point.module_name, exc)
              debug(traceback.format_exc())
              continue
  
          for klass in classes:
              all_classes[klass.extension_name] = klass
  
      if extra_extension_paths:
          for klass in __get_extra_extension_classes(extra_extension_paths):
              all_classes[klass.extension_name] = klass
  
      klass_list = list(all_classes.values())
      if not sort:
          return klass_list
  
      for i, klass in enumerate(klass_list):
          deps = klass.get_dependencies()
          topodeps = set()
          for dep in deps:
              if dep.dependency_name not in all_classes:
                  if dep.optional:
                      continue
                  else:
                      error("setup-issue",
                            "Missing dependency %s for %s" %
                            (dep.dependency_name, klass.extension_name))
              if dep.is_upstream:
                  topodeps.add(
                      klass_list.index(all_classes[dep.dependency_name]))
  
          deps_map[i] = topodeps
  
      sorted_class_indices = toposort_flatten(deps_map)
      sorted_classes = [klass_list[i] for i in sorted_class_indices]
      return sorted_classes