class_docstr: Tests for Scenic Optax utils.
class_docstr_tok: ["Tests","for","Scenic","Optax","utils","."]
docstr: Tests `replace_frozen`.
docstr_tok: ["Tests","`","replace_frozen","`","."]
code: def test_replace_frozen(self):
      """Tests `replace_frozen`."""
      tree = {"a": {"b": 1, "d": 2}, "c": 3}
      schedule = {
          "name": ml_collections.ConfigDict(
              {"re": "a/.*", "lr_configs": None}
          ),
          "rest": ml_collections.ConfigDict(
              {"re": "c", "lr_configs": {}}
          ),
      }
      new_tree = optax.replace_frozen(schedule, tree, 0)
      target_tree = {"a": {"b": 0, "d": 0}, "c": 3}
      self.assertAllEqual(target_tree, new_tree)
  
imports: from typing import Optional
  from absl.testing import absltest
  from absl.testing import parameterized
  import ml_collections
  from scenic.train_lib import optax
  import tensorflow
label_desc: Use image node_id 8 for calling the OptaxTest obj's underlying member method code with example usage: obj.test_replace_frozen() without return types