code: def _to_flat_dict_inner(d, parents=()):
      for k, v in d.items():
          if not isinstance(v, d.__class__):
              if parents:
                  k = parents + (k,)
              yield (k, v)
          else:
              yield from _to_flat_dict_inner(
                  d=v, parents=parents + (k,)
              )
  
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 1 for calling a global function with example usage: _to_flat_dict_inner(d, parents) without return types