class_docstr: Common superclass for the structured vectorised env implementations in Maze.
  
  :param n_envs: The number of vectorised environments.
  :param action_spaces_dict: Action spaces dict (not vectorized, as it is the same for all environments)
  :param observation_spaces_dict: Observation spaces dict (not vectorized, as it is the same for all environments)
  :param logging_prefix: If set, will report epoch statistics under this logging prefix.
code: def __init__(
      self,
      n_envs: int,
      action_spaces_dict: Dict[StepKeyType, gym.spaces.Space],
      observation_spaces_dict: Dict[StepKeyType, gym.spaces.Space],
      agent_counts_dict: Dict[StepKeyType, int],
      logging_prefix: Optional[str] = None,
  ):
      super().__init__(n_envs)
  
      # Spaces
      self._action_spaces_dict = action_spaces_dict
      self._observation_spaces_dict = observation_spaces_dict
      self._agent_counts_dict = agent_counts_dict
  
      # Aggregate episode statistics from individual envs
      self.epoch_stats = LogStatsAggregator(LogStatsLevel.EPOCH)
  
      # register a logger for the epoch statistics if desired
      if logging_prefix is not None:
          self.epoch_stats.register_consumer(
              get_stats_logger(logging_prefix)
          )
  
      # Keep track of current actor IDs, actor dones, and env times (should be updated in step and reset methods).
      self._actor_ids = None
      self._actor_dones = None
      self._env_times = None
  
imports: from abc import ABC, abstractmethod
  from typing import Dict, Union, Optional, Callable
  import gym
  import numpy
  from maze.core.annotations import override
  from maze.core.env.structured_env import StructuredEnv, ActorID, StepKeyType
  from maze.core.env.structured_env_spaces_mixin import StructuredEnvSpacesMixin
  from maze.core.env.time_env_mixin import TimeEnvMixin
  from maze.core.log_stats.log_stats import LogStatsAggregator, LogStatsLevel, get_stats_logger, LogStatsValue
  from maze.core.log_stats.log_stats_env import LogStatsEnv
  from maze.train.parallelization.vector_env.vector_env import VectorEnv
label_desc: Use image node_id 1 to create a new StructuredVectorEnv object from inherited base classes: VectorEnv, StructuredEnv, StructuredEnvSpacesMixin, LogStatsEnv, TimeEnvMixin, ABC with example: obj = StructuredVectorEnv(n_envs, action_spaces_dict, observation_spaces_dict, agent_counts_dict, logging_prefix)