code: def test_max_episode_length(self):
      # pylint: disable=unsubscriptable-object
      path = rollout(self.env, self.policy, max_episode_length=3)
      assert path["observations"].shape[0] == 3
      assert path["actions"].shape[0] == 3
      assert path["rewards"].shape[0] == 3
      assert path["agent_infos"]["dummy"].shape[0] == 3
      assert path["env_infos"]["dummy"].shape[0] == 3
  
imports: import csv
  import math
  import tempfile
  import akro
  import dowel
  from dowel import logger, tabular
  import numpy
  import pytest
  import tensorflow
  import torch
  from garage import _Default, EnvSpec, EpisodeBatch, log_multitask_performance, log_performance, make_optimizer, rollout, StepType
  from garage.envs import GymEnv
  from tests.fixtures import TfGraphTestCase
  from tests.fixtures.envs.dummy import DummyBoxEnv
  from tests.fixtures.policies import DummyPolicy
label_desc: Use image node_id 2 for calling the TestRollout obj's underlying member method code with example usage: obj.test_max_episode_length() without return types