code: def _validate_spec(spec: types.NestedSpec, value: types.NestedArray):
      """Validate a value from a potentially nested spec."""
      tree.assert_same_structure(value, spec)
      tree.map_structure(lambda s, v: s.validate(v), spec, value)
  
imports: import threading
  from typing import List, Mapping, Optional, Sequence, Callable, Iterator
  from acme import core
  from acme import specs
  from acme import types
  from acme import wrappers
  import dm_env
  import numpy
  import reverb
  from rlds import rlds_types
  import tensorflow
  import tree
label_desc: Use image node_id 1 for calling a global function with example usage: _validate_spec(spec, value) without return types