code: def on_env_step(self, env_id, obs, rew, done, info):
      assert rew == 1.0
      index = info["sample"]
      if done:
          # assert index not in self.finished
          self.finished.add(index)
      self.counter[index] += 1
  
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 2 for calling the MetricTracker obj's underlying member method code with example usage: obj.on_env_step(env_id, obs, rew, done, info) without return types