code: def test_mtsac_inverted_double_pendulum():
      """Performance regression test of MTSAC on 2 InvDoublePendulum envs."""
      env_names = [
          "InvertedDoublePendulum-v2",
          "InvertedDoublePendulum-v2",
      ]
      task_envs = [
          GymEnv(name, max_episode_length=100) for name in env_names
      ]
      env = MultiEnvWrapper(
          task_envs, sample_strategy=round_robin_strategy
      )
      test_envs = MultiEnvWrapper(
          task_envs, sample_strategy=round_robin_strategy
      )
      deterministic.set_seed(0)
      trainer = Trainer(snapshot_config=snapshot_config)
      policy = TanhGaussianMLPPolicy(
          env_spec=env.spec,
          hidden_sizes=[32, 32],
          hidden_nonlinearity=torch.nn.ReLU,
          output_nonlinearity=None,
          min_std=np.exp(-20.0),
          max_std=np.exp(2.0),
      )
  
      qf1 = ContinuousMLPQFunction(
          env_spec=env.spec,
          hidden_sizes=[32, 32],
          hidden_nonlinearity=F.relu,
      )
  
      qf2 = ContinuousMLPQFunction(
          env_spec=env.spec,
          hidden_sizes=[32, 32],
          hidden_nonlinearity=F.relu,
      )
      replay_buffer = PathBuffer(
          capacity_in_transitions=int(1e6),
      )
      num_tasks = 2
      buffer_batch_size = 128
      sampler = LocalSampler(
          agents=policy,
          envs=env,
          max_episode_length=env.spec.max_episode_length,
          worker_class=FragmentWorker,
      )
      mtsac = MTSAC(
          policy=policy,
          qf1=qf1,
          qf2=qf2,
          sampler=sampler,
          gradient_steps_per_itr=100,
          eval_env=[test_envs],
          env_spec=env.spec,
          num_tasks=num_tasks,
          steps_per_epoch=5,
          replay_buffer=replay_buffer,
          min_buffer_size=1e3,
          target_update_tau=5e-3,
          discount=0.99,
          buffer_batch_size=buffer_batch_size,
      )
      trainer.setup(mtsac, env)
      ret = trainer.train(n_epochs=8, batch_size=128, plot=False)
      assert ret > 0
  
file_path: garage/tests/garage/torch/algos/test_mtsac.py
imports: import numpy
  import pytest
  import torch
  from torch.nn import functional
  from garage.envs import GymEnv, MultiEnvWrapper
  from garage.envs.multi_env_wrapper import round_robin_strategy
  from garage.experiment import deterministic
  from garage.replay_buffer import PathBuffer
  from garage.sampler import FragmentWorker, LocalSampler
  from garage.torch import global_device, set_gpu_mode
  from garage.torch.algos import MTSAC
  from garage.torch.policies import TanhGaussianMLPPolicy
  from garage.torch.q_functions import ContinuousMLPQFunction
  from garage.trainer import Trainer
  from tests.fixtures import snapshot_config
label_desc: Use image node_id 3 for calling a global function with example usage: test_mtsac_inverted_double_pendulum() without return types