class_docstr: Batch together multiple py policies and act as a single batch.
  
  The policies should only access shared python variables using
  shared mutex locks (from the threading module).
class_docstr_tok: ["Batch","together","multiple","py","policies","and","act","as","a","single","batch",".","The","policies","should","only","access","shared","python","variables","using","shared","mutex","locks","(","from","the","threading","module",")","."]
code: def _validate_spec(self, policy_spec_method, spec_to_match):
      # pytype: disable=attribute-error
      if any(
          policy_spec_method.__get__(p) != spec_to_match
          for p in self._policies
      ):
          raise ValueError(
              "All policies must have the same specs.  Saw: %s"
              % self._policies
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from multiprocessing import dummy
  from typing import Sequence, Optional
  import gin
  from tf_agents.policies import py_policy
  from tf_agents.trajectories import policy_step
  from tf_agents.trajectories import time_step
  from tf_agents.typing import types
  from tf_agents.utils import nest_utils
label_desc: Use image node_id 3 for calling the BatchedPyPolicy obj's underlying member method code with example usage: obj._validate_spec(policy_spec_method, spec_to_match) without return types