code: def update(self, ob, rew, done, info):
      self.rewards.append(rew)
      if done:
          self.needs_reset = True
          eprew = sum(self.rewards)
          eplen = len(self.rewards)
          epinfo = {
              "r": round(eprew, 6),
              "l": eplen,
              "t": round(time.time() - self.tstart, 6),
          }
          for k in self.info_keywords:
              epinfo[k] = info[k]
          self.episode_rewards.append(eprew)
          self.episode_lengths.append(eplen)
          self.episode_times.append(time.time() - self.tstart)
          epinfo.update(self.current_reset_info)
          if self.results_writer:
              self.results_writer.write_row(epinfo)
          assert isinstance(info, dict)
          if isinstance(info, dict):
              info["episode"] = epinfo
  
      self.total_steps += 1
  
imports: from gym.core import Wrapper
  import time
  from glob import glob
  import csv
  import os.path
  import json
label_desc: Use image node_id 5 for calling the Monitor obj's underlying member method code with example usage: obj.update(ob, rew, done, info) without return types