code: def is_subset(
      *,
      subset: Mapping[str, Mapping[str, Any]],
      superset: Mapping[str, Mapping[str, Any]],
  ) -> bool:
      """Checks whether the leaves of subset appear in superset.
  
      Note that this is vacuously true in the case that both structures have no
      leaves:
  
      >>> hk.data_structures.is_subset(subset={'a': {}}, superset={})
      True
  
      Args:
        subset: The subset to check.
        superset: The superset to check.
  
      Returns:
        A boolean indicating whether all elements in subset are contained in
        superset.
      """
      subset = {(m, n) for m, n, _ in traverse(subset)}
      superset = {(m, n) for m, n, _ in traverse(superset)}
      return subset.issubset(superset)
  
file_path: dm-haiku/haiku/_src/filtering.py
imports: import collections
  from collections.abc import Generator, Mapping, MutableMapping
  from typing import Any, Callable, TypeVar
  from haiku._src import data_structures
  from haiku._src import utils
  import jax
label_desc: Use image node_id 7 for calling a global function with example usage: is_subset() and returns: subset