code: def __init__(self, flags, model):
      batch_size = flags.actor_batch_size
      device = flags.device
      self.batch_size = batch_size
      self.prev_action = torch.zeros(batch_size).long().to(device)
      self.future = None
      self.core_state = model.initial_state(batch_size=batch_size)
      self.core_state = tuple(s.to(device) for s in self.core_state)
      self.initial_core_state = self.core_state
  
      self.running_reward = torch.zeros(batch_size)
      self.step_count = torch.zeros(batch_size)
  
      self.discounting = flags.discounting
      self.weighted_returns = torch.zeros(batch_size)
      self.weighted_returns_rms = RunningMeanStd()
  
      self.time_batcher = moolib.Batcher(
          flags.unroll_length + 1, device
      )
  
imports: import copy
  import dataclasses
  import logging
  import torch
  import moolib
label_desc: Use image node_id 1 to create a new EnvBatchState object  with example: obj = EnvBatchState(flags, model)