code: def test_finite_dummy_vector_env_complex():
      length = 100
      dataset = DummyDataset(length)
      envs = FiniteDummyVectorEnv(
          DoNothingTracker(),
          [
              _finite_env_factory(dataset, 5, i, complex=True)
              for i in range(5)
          ],
      )
      envs._collector_guarded = True
      policy = AnyPolicy()
      test_collector = Collector(policy, envs, exploration_noise=True)
  
      try:
          test_collector.collect(n_step=10**18)
      except StopIteration:
          pass
  
imports: from collections import Counter
  import gym
  import numpy
  from tianshou.data import Batch, Collector
  from tianshou.policy import BasePolicy
  from torch.utils.data import DataLoader, Dataset, DistributedSampler
  from qlib.rl.utils.finite_env import LogWriter, FiniteDummyVectorEnv, FiniteShmemVectorEnv, FiniteSubprocVectorEnv, check_nan_observation, generate_nan_observation
label_desc: Use image node_id 6 for calling a global function with example usage: test_finite_dummy_vector_env_complex() without return types