code: def _to_flat_dict(d):
      """
      Convert the given nested dictionary to a flat dictionary
      with tuple keys.
      """
      return {k: v for k, v in _to_flat_dict_inner(d)}
  
imports: from __future__ import annotations
  import itertools
  import warnings
  from collections import abc
  from functools import cached_property, reduce
  from typing import TYPE_CHECKING, Any, Callable, Dict, Mapping, Optional, Tuple, Union
  import numpy
  import pandas
  from packaging.version import Version
  from pandas.api.types import is_bool
  from typing_extensions import Self
  import cudf
  from cudf.core import column
label_desc: Use image node_id 2 for calling a global function with example usage: _to_flat_dict(d) and returns: unknown