code: def format_classes_list(classes, page_name):
      for i in range(len(classes)):
          if not isinstance(classes[i], (list, tuple)):
              classes[i] = (classes[i], [])
      for class_, class_methods in classes:
          if not inspect.isclass(class_):
              # TODO: add a test for this
              raise TypeError(
                  f"{class_} was given in the class list "
                  f"of {page_name} but {class_} is not a Python class."
              )
      return classes
  
file_path: autokeras/docs/keras_autodoc/utils.py
imports: import importlib
  import inspect
  import os
  import re
label_desc: Use image node_id 5 for calling a global function with example usage: format_classes_list(classes, page_name) and returns: classes