code: def save_model(self):
      model = self.actor_critic
  
      if torch.cuda.is_available():
          model = copy.deepcopy(self.actor_critic).cpu()
  
      torch.save(model, self.model_path)
  
      with open(self.model_path.replace(".pth", ".json"), "w") as f:
          data = {
              "current_episode": self.current_episode,
              "current_step": self.current_step,
          }
  
          f.write(json.dumps(data))
  
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 4 for calling the PPOAgent obj's underlying member method code with example usage: obj.save_model() without return types