code: def _extract_class_names(spec):
      """Get all maximal alphanumeric substrings that start with a capital letter.
  
      Parameters
      ----------
      spec : str (any)
  
      Returns
      -------
      cls_name_list : list of str
          list of all maximal alphanumeric substrings starting with a capital in ``spec``
          excluding reserved expressions True, False (if they occur)
      """
      # class names are all UpperCamelCase alphanumeric strings
      # which is the same as maximal substrings starting with a capital
      pattern = r"\b([A-Z][A-Za-z0-9_]*)\b"
      cls_name_list = re.findall(pattern, spec)
  
      # we need to exclude expressions that look like classes per the regex
      # but aren't
      EXCLUDE_LIST = ["True", "False"]
      cls_name_list = [
          x for x in cls_name_list if x not in EXCLUDE_LIST
      ]
  
      return cls_name_list
  
imports: import re
  from sktime.registry._lookup import all_estimators
label_desc: Use image node_id 1 for calling a global function with example usage: _extract_class_names(spec) and returns: cls_name_list