code: def show_options(method=None, disp=True):
      """Show documentation for additional options of Dynamic Time Warping
      methods.
  
      These are method-specific options that can be supplied through the
      ``options`` dict.
  
      Parameters
      ----------
      method : None or str (default = None)
          If None, shows all methods. Otherwise, shows only the options for the
          specified method. If str, it must be either 'classic', 'sakoechiba',
          'itakura', 'region', 'multiscale' or 'fast'.
  
      disp : bool (default = True)
          Whether to print the result rather than returning it.
  
      Returns
      -------
      text : None or str
          Either None (if ``disp=True``) or the text string (if ``disp=False``).
  
      Notes
      -----
      The available methods are:
  
      - :ref:`'classic' <metrics.dtw-classic>`
      - :ref:`'sakoechiba' <metrics.dtw-sakoechiba>`
      - :ref:`'itakura' <metrics.dtw-itakura>`
      - :ref:`'region' <metrics.dtw-region>`
      - :ref:`'multiscale' <metrics.dtw-multiscale>`
      - :ref:`'fast' <metrics.dtw-fast>`
  
      """
      import textwrap
  
      def get_options(string):
          start = "    Options"
          end = "    References"
          str_lines = string.splitlines()
          start_idx = str_lines.index(start)
          end_idx = str_lines.index(end)
          doc = textwrap.dedent("\n".join(str_lines[:start_idx])) + "\n"
          doc += (
              textwrap.dedent("\n".join(str_lines[start_idx:end_idx]))
              + "\n"
          )
          return doc
  
      text = """\n"""
      if method is None:
          methods = (
              "classic",
              "sakoechiba",
              "itakura",
              "region",
              "multiscale",
              "fast",
          )
          for met in methods:
              text += show_options(met, disp=False)
      elif method == "classic":
          text += "classic\n=======\n\n"
          text += get_options(_dtw_classic.__doc__)
      elif method == "sakoechiba":
          text += "sakoechiba\n==========\n\n"
          text += get_options(_dtw_sakoechiba.__doc__)
      elif method == "itakura":
          text += "itakura\n=======\n\n"
          text += get_options(_dtw_itakura.__doc__)
      elif method == "region":
          text += "region\n=======\n\n"
          text += get_options(_dtw_itakura.__doc__)
      elif method == "multiscale":
          text += "multiscale\n==========\n\n"
          text += get_options(_dtw_multiscale.__doc__)
      elif method == "fast":
          text += "fast\n====\n\n"
          text += get_options(_dtw_fast.__doc__)
      else:
          raise ValueError(
              "'method' must be either None, 'classic', "
              "'sakoechiba', 'itakura', 'region', 'multiscale' "
              "or 'fast'."
          )
      if disp:
          print(text)
          return
      else:
          return text
  
imports: import numpy
  from math import ceil, log2, sqrt
  from numba import njit, prange
  from sklearn.utils import check_array
label_desc: Use image node_id 30 for calling a global function with example usage: show_options(method, disp) and returns: doc, text