code: def save_one_reward(path, reward, score, loss, cur_iter):
      """
      save one iter reward/score
      mode: append
      """
      fp = open(path, "a")
      fp.write(
          "cur_iter: %d | reward: %.5f | score: %.5f | loss: %.5f\n"
          % (cur_iter, reward, score, loss)
      )
      fp.close()
  
imports: import sys
  import os
  import numpy
  import networkx
  import random
  from rdkit import Chem
  from rdkit.Chem import rdmolops
  from rdkit.Chem import rdMolDescriptors
  from rdkit import DataStructs
  import torch
  import torch.nn.functional
label_desc: Use image node_id 5 for calling a global function with example usage: save_one_reward(path, reward, score, loss, cur_iter) without return types