class_docstr: VideoWrapper which generates videos from a mujoco physics object.
  
  This passes its keyword arguments into the parent `VideoWrapper` class (refer
  here for any default arguments).
code: def __init__(
      self,
      environment: dm_env.Environment,
      *,
      frame_rate: Optional[int] = None,
      camera_id: Optional[int] = 0,
      height: int = 240,
      width: int = 320,
      playback_speed: float = 1.0,
      **kwargs,
  ):
      # Check that we have a mujoco environment (or a wrapper thereof).
      if not hasattr(environment, "physics"):
          raise ValueError(
              "MujocoVideoWrapper expects an environment which "
              "exposes a physics attribute corresponding to a MuJoCo "
              "physics engine"
          )
  
      # Compute frame rate if not set.
      if frame_rate is None:
          try:
              control_timestep = getattr(
                  environment, "control_timestep"
              )()
          except AttributeError as e:
              raise AttributeError(
                  "MujocoVideoWrapper expects an environment which "
                  "exposes a control_timestep method, like "
                  "dm_control environments, or frame_rate "
                  "to be specified."
              ) from e
          frame_rate = int(round(playback_speed / control_timestep))
  
      super().__init__(environment, frame_rate=frame_rate, **kwargs)
      self._camera_id = camera_id
      self._height = height
      self._width = width
  
imports: import os.path
  import tempfile
  from typing import Callable, Optional, Sequence, Tuple, Union
  from acme.utils import paths
  from acme.wrappers import base
  import dm_env
  import matplotlib
  import matplotlib.animation
  import matplotlib.pyplot
  import numpy
label_desc: Use image node_id 1 to create a new MujocoVideoWrapper object from inherited base classes: VideoWrapper with example: obj = MujocoVideoWrapper(environment)