code: def test_partition_n_nested(self):
      nested_structure = {
          "layer": {"a": [1, 2, 3], "b": {object()}, "c": {"a": "b"}}
      }
      cnt = itertools.count()
      fn = lambda m, n, v: next(cnt)
      out1, out2, out3 = filtering.partition_n(fn, nested_structure, 3)
      self.assertEqual(
          out1, {"layer": {"a": nested_structure["layer"]["a"]}}
      )
      self.assertEqual(
          out2, {"layer": {"b": nested_structure["layer"]["b"]}}
      )
      self.assertEqual(
          out3, {"layer": {"c": nested_structure["layer"]["c"]}}
      )
  
imports: import collections
  from collections.abc import Sequence
  import itertools
  import re
  import types
  from typing import Any, Callable
  from absl.testing import absltest
  from absl.testing import parameterized
  from haiku._src import basic
  from haiku._src import data_structures
  from haiku._src import filtering
  from haiku._src import transform
  import jax
  import jax.numpy
label_desc: Use image node_id 3 for calling the FilteringTest obj's underlying member method code with example usage: obj.test_partition_n_nested() without return types