code: def split_dict_py_tf(dictionary):
      """Splits dictionary based on Python and TensorFlow values.
  
      Args:
        dictionary: An arbitrary `dict`. Any `dict` objects in values will be
          processed recursively.
  
      Returns:
        A tuple `(d_py, d_tf)`, where
        d_py: A `dict` of the same structure as `dictionary`, with TensorFlow values
          removed, recursively.
        d_tf: A `dict` of the same structure as `dictionary`, with non-TensorFlow
          values removed, recursively.
  
      Raises:
        TypeError:
          If the input is not a `dict` object.
      """
      if not isinstance(dictionary, dict):
          raise TypeError
      d_py, d_tf = collections.OrderedDict(), collections.OrderedDict()
      for k, v in six.iteritems(dictionary):
          if isinstance(v, dict):
              d_py[k], d_tf[k] = split_dict_py_tf(v)
          else:
              if tf.is_tensor(v):
                  d_tf[k] = v
              else:
                  d_py[k] = v
      return d_py, d_tf
  
file_path: model-optimization/tensorflow_model_optimization/python/core/internal/tensor_encoding/utils/py_utils.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import enum
  import numpy
  import six
  import tensorflow
  import tree
label_desc: Use image node_id 2 for calling a global function with example usage: split_dict_py_tf(dictionary) and returns: d_py,  d_tf