class_docstr: Test for utilities created in core_encoder.py.
code: def test_split_params_by_commuting_structure(self):
      commuting_structure = _get_test_commuting_structure()
      params = {
          PARAMS: {"param_a": 0.0, "param_b": (-1.0, 1.0)},
          CHILDREN: {
              "key_1": {
                  PARAMS: {"param_c": None},
                  CHILDREN: {
                      "key_4": {
                          PARAMS: {"param_e": (-1.0, 1.0)},
                          CHILDREN: {},
                      }
                  },
              },
              "key_2": {
                  PARAMS: {},
                  CHILDREN: {},
              },
              "key_3": {
                  PARAMS: {"param_d": [1, 2]},
                  CHILDREN: {},
              },
          },
      }
      expected_before_sum_params = {
          PARAMS: {"param_a": None, "param_b": None},
          CHILDREN: {
              "key_1": {
                  PARAMS: {"param_c": None},
                  CHILDREN: {
                      "key_4": {
                          PARAMS: {"param_e": (-1.0, 1.0)},
                          CHILDREN: {},
                      }
                  },
              },
              "key_2": {
                  PARAMS: {},
                  CHILDREN: {},
              },
              "key_3": {
                  PARAMS: {"param_d": None},
                  CHILDREN: {},
              },
          },
      }
      expected_after_sum_params = {
          PARAMS: {"param_a": 0.0, "param_b": (-1.0, 1.0)},
          CHILDREN: {
              "key_1": {
                  PARAMS: {"param_c": None},
                  CHILDREN: {
                      "key_4": {PARAMS: {"param_e": None}, CHILDREN: {}}
                  },
              },
              "key_2": {
                  PARAMS: {},
                  CHILDREN: {},
              },
              "key_3": {
                  PARAMS: {"param_d": [1, 2]},
                  CHILDREN: {},
              },
          },
      }
  
      (
          before_sum_params,
          after_sum_params,
      ) = core_encoder.split_params_by_commuting_structure(
          params, commuting_structure
      )
      self.assertEqual(expected_before_sum_params, before_sum_params)
      self.assertEqual(expected_after_sum_params, after_sum_params)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import numpy
  import tensorflow
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.core import core_encoder
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.core import encoding_stage
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.testing import test_utils
label_desc: Use image node_id 1 for calling the UtilsTest obj's underlying member method code with example usage: obj.test_split_params_by_commuting_structure() without return types