class_docstr: Base Agent class handling the interaction with the environment.
  
  >>> env = gym.make("CartPole-v1")
  >>> buffer = ReplayBuffer(10)
  >>> Agent(env, buffer)  # doctest: +ELLIPSIS
  <...reinforce_learn_Qnet.Agent object at ...>
docstr: Carries out a single interaction step between the agent and the environment.
  
  Args:
      net: DQN network
      epsilon: value to determine likelihood of taking a random action
      device: current device
  
  Returns:
      reward, done
docstr_tok: ["Carries","out","a","single","interaction","step","between","the","agent","and","the","environment",".","Args",":","net",":","DQN","network","epsilon",":","value","to","determine","likelihood","of","taking","a","random","action","device",":","current","device","Returns",":","reward",",","done"]
code: def play_step(
      self, net: nn.Module, epsilon: float = 0.0, device: str = "cpu"
  ) -> Tuple[float, bool]:
      """Carries out a single interaction step between the agent and the environment.
  
      Args:
          net: DQN network
          epsilon: value to determine likelihood of taking a random action
          device: current device
  
      Returns:
          reward, done
  
      """
      action = self.get_action(net, epsilon, device)
  
      # do step in the environment
      new_state, reward, done, _ = self.env.step(action)
  
      exp = Experience(self.state, action, reward, done, new_state)
  
      self.replay_buffer.append(exp)
  
      self.state = new_state
      if done:
          self.reset()
      return reward, done
  
imports: import argparse
  from collections import OrderedDict, deque, namedtuple
  from typing import Iterator, List, Tuple
  import gym
  import numpy
  import torch
  import torch.nn
  import torch.optim
  from lightning.pytorch import LightningModule, Trainer, cli_lightning_logo, seed_everything
  from torch.optim.optimizer import Optimizer
  from torch.utils.data import DataLoader
  from torch.utils.data.dataset import IterableDataset
label_desc: Use image node_id 4 for calling the Agent obj's underlying member method code with example usage: obj.play_step(net, epsilon, device) and returns: reward,  done