code: def _load_legacy(dataset_path):
      try:
          import deepdish as dd
      except ImportError as e:
          # catches ModuleNotFoundError since it's a subclass
          raise HypertoolsIOError(
              "To load legacy-format datasets, install the 'deepdish' module"
          ) from e
      data_dict = dd.io.load(dataset_path)
  
      if isinstance(data_dict["data"], dict):
          data_dict["data"] = pd.DataFrame(data_dict["data"])
      elif isinstance(data_dict["data"], np.ndarray):
          data_dict["data"] = list(data_dict["data"])
      data_dict["xform_data"] = list(data_dict["xform_data"])
      return DataGeometry(**data_dict)
  
file_path: hypertools/hypertools/tools/load.py
imports: import pickle
  from os.path import expanduser, expandvars
  from pathlib import Path
  import numpy
  import pandas
  import requests
  from ..datageometry import DataGeometry
  from .._shared.exceptions import HypertoolsIOError
  from .analyze import analyze
label_desc: Use image node_id 2 for calling a global function with example usage: _load_legacy(dataset_path) and returns: DataGeometry