class_docstr: Vectorized environment that serially runs multiple environments.
  
  Example::
  
      >>> import gym
      >>> env = gym.vector.SyncVectorEnv([
      ...     lambda: gym.make("Pendulum-v0", g=9.81),
      ...     lambda: gym.make("Pendulum-v0", g=1.62)
      ... ])
      >>> env.reset()
      array([[-0.8286432 ,  0.5597771 ,  0.90249056],
             [-0.85009176,  0.5266346 ,  0.60007906]], dtype=float32)
class_docstr_tok: ["Vectorized","environment","that","serially","runs","multiple","environments",".","Example",":",":",">",">",">","import","gym",">",">",">","env","=","gym.vector.SyncVectorEnv","(","[","...","lambda",":","gym.make","(","``","Pendulum-v0","''",",","g=9.81",")",",","...","lambda",":","gym.make","(","``","Pendulum-v0","''",",","g=1.62",")","...","]",")",">",">",">","env.reset","(",")","array","(","[","[","-0.8286432",",","0.5597771",",","0.90249056","]",",","[","-0.85009176",",","0.5266346",",","0.60007906","]","]",",","dtype=float32",")"]
docstr: Sets an attribute of the sub-environments.
  
  Args:
      name: The property name to change
      values: Values of the property to be set to. If ``values`` is a list or
          tuple, then it corresponds to the values for each individual
          environment, otherwise, a single value is set for all environments.
  
  Raises:
      ValueError: Values must be a list or tuple with length equal to the number of environments.
docstr_tok: ["Sets","an","attribute","of","the","sub-environments",".","Args",":","name",":","The","property","name","to","change","values",":","Values","of","the","property","to","be","set","to",".","If","``","values","``","is","a","list","or","tuple",",","then","it","corresponds","to","the","values","for","each","individual","environment",",","otherwise",",","a","single","value","is","set","for","all","environments",".","Raises",":","ValueError",":","Values","must","be","a","list","or","tuple","with","length","equal","to","the","number","of","environments","."]
code: def set_attr(self, name: str, values: Union[list, tuple, Any]):
      """Sets an attribute of the sub-environments.
  
      Args:
          name: The property name to change
          values: Values of the property to be set to. If ``values`` is a list or
              tuple, then it corresponds to the values for each individual
              environment, otherwise, a single value is set for all environments.
  
      Raises:
          ValueError: Values must be a list or tuple with length equal to the number of environments.
      """
      if not isinstance(values, (list, tuple)):
          values = [values for _ in range(self.num_envs)]
      if len(values) != self.num_envs:
          raise ValueError(
              "Values must be a list or tuple with length equal to the "
              f"number of environments. Got `{len(values)}` values for "
              f"{self.num_envs} environments."
          )
  
      for env, value in zip(self.envs, values):
          setattr(env, name, value)
  
file_path: gym/gym/vector/sync_vector_env.py
imports: from copy import deepcopy
  from typing import Any, Callable, Iterator, List, Optional, Sequence, Union
  import numpy
  from gym import Env
  from gym.spaces import Space
  from gym.vector.utils import concatenate, create_empty_array, iterate
  from gym.vector.vector_env import VectorEnv
label_desc: Use image node_id 7 for calling the SyncVectorEnv obj's underlying member method code with example usage: obj.set_attr(name, values) without return types