code: def _expand_key(key, hdf):
      import glob
  
      if not glob.has_magic(key):
          keys = [key]
      else:
          keys = [k for k in hdf.keys() if fnmatch(k, key)]
          # https://github.com/dask/dask/issues/5934
          # TODO: remove this part if/when pandas copes with all keys
          keys.extend(
              n._v_pathname
              for n in hdf._handle.walk_nodes("/", classname="Table")
              if fnmatch(n._v_pathname, key)
              and n._v_name != "table"
              and n._v_pathname not in keys
          )
      return keys
  
imports: from __future__ import annotations
  import os
  import uuid
  from fnmatch import fnmatch
  from glob import glob
  from warnings import warn
  import pandas
  from fsspec.utils import build_name_function, stringify_path
  from tlz import merge
  from dask import config
  from dask.base import compute_as_if_collection, get_scheduler, named_schedulers, tokenize
  from dask.dataframe.backends import dataframe_creation_dispatch
  from dask.dataframe.core import DataFrame, Scalar
  from dask.dataframe.io.io import _link, from_map
  from dask.dataframe.io.utils import DataFrameIOFunction, SupportsLock
  from dask.highlevelgraph import HighLevelGraph
  from dask.utils import get_scheduler_lock
  from dask.dataframe.core import _Frame
label_desc: Use image node_id 6 for calling a global function with example usage: _expand_key(key, hdf) and returns: keys