code: def generate_actions(self, state, **kwargs):
      frames = list()
  
      for game_frame in state.frames:
          frames.append(
              torch.tensor(
                  torch.from_numpy(game_frame.frame),
                  dtype=torch.float32,
              )
          )
  
      self.current_state = torch.stack(frames, 0)
      self.current_state = self.current_state[None, :]
  
      with torch.no_grad():
          (
              self.current_value,
              self.current_action,
              self.current_action_log_prob,
              self.current_states,
          ) = self.actor_critic.act(
              self.current_state,
              self.storage.states[self.storage.step],
              self.storage.masks[self.storage.step],
          )
  
      actions = list()
  
      label = self.game_inputs_mappings[0][int(self.current_action[0])]
      action = self.game_inputs[0]["inputs"][label]
  
      actions.append((label, action, None))
  
      for action in actions:
          self.analytics_client.track(
              event_key="AGENT_ACTION",
              data={
                  "label": action[0],
                  "action": [str(a) for a in action[1]],
                  "input_value": action[2],
              },
          )
  
      return actions
  
file_path: SerpentAI/serpent/machine_learning/reinforcement_learning/agents/ppo_agent.py
imports: from serpent.machine_learning.reinforcement_learning.agent import Agent
  from serpent.game_frame import GameFrame
  from serpent.game_frame_buffer import GameFrameBuffer
  from serpent.enums import InputControlTypes
  from serpent.logger import Loggers
  from serpent.utilities import SerpentError
  import os
  import enum
  import copy
  import json
  import numpy
label_desc: Use image node_id 2 for calling the PPOAgent obj's underlying member method code with example usage: obj.generate_actions(state) and returns: actions