code: def _select_options(pat: str) -> list[str]:
      """
      returns a list of keys matching `pat`
  
      if pat=="all", returns all registered options
      """
      # short-circuit for exact key
      if pat in _registered_options:
          return [pat]
  
      # else look through all of them
      keys = sorted(_registered_options.keys())
      if pat == "all":  # reserved key
          return keys
  
      return [k for k in keys if re.search(pat, k, re.I)]
  
imports: from __future__ import annotations
  from contextlib import ContextDecorator, contextmanager
  import re
  from typing import TYPE_CHECKING, Any, Callable, Generic, NamedTuple, cast
  import warnings
  from pandas._typing import F, T
  from pandas.util._exceptions import find_stack_level
label_desc: Use image node_id 9 for calling a global function with example usage: _select_options(pat) and returns: unknown, list, keys