def METHOD_NAME(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 = {}, {}
  for k, v in six.iteritems(dictionary):
    if isinstance(v, dict):
      d_py[k], d_tf[k] = METHOD_NAME(v)
    else:
      if tf.is_tensor(v):
        d_tf[k] = v
      else:
        d_py[k] = v
  return d_py, d_tf