class_docstr: Sort example gallery by title of subsection.
  Assumes README.txt exists for all subsections and uses the subsection with
  dashes, '---', as the adornment.
code: def __call__(self, directory):
      src_path = os.path.normpath(os.path.join(self.src_dir, directory))
      readme = os.path.join(src_path, "README.txt")
  
      try:
          with open(readme, "r") as f:
              content = f.read()
      except FileNotFoundError:
          return directory
  
      title_match = self.regex.search(content)
      if title_match is not None:
          return title_match.group(1)
      return directory
  
file_path: scikit-optimize/doc/conf.py
imports: import warnings
  import os
  import re
  from packaging.version import parse
  import sys
  import skopt
  from github_link import make_linkcode_resolve
  import sphinx_gallery
label_desc: Use image node_id 3 for calling the SubSectionTitleOrder obj's underlying member method code with example usage: obj.__call__(directory) and returns: directory, title_match, directory