code: def runtest(
      experiment_name,
      mod_params,
      mod_type,
      mod_name,
      drug_type,
      precision,
      filename,
      base_content,
      chat_input,
  ):
      basepath = os.path.join(
          current_script_dir,
          gen_path,
          experiment_name,
          mod_params,
          mod_type,
          mod_name,
          precision,
          drug_type,
      )
      path = os.path.join(basepath, filename)
      i = 2
      while os.path.exists(path):
          path = os.path.join(basepath, f"v{i}__{filename}")
          i += 1
      os.makedirs(os.path.dirname(path), exist_ok=True)
      with open(path, "a") as file:
          file.write(base_content)
      with torch.no_grad():
          for i in range(5):
              seed = seed_start + i
              print("Using Seed: ", seed)
              torch.manual_seed(seed)
              generated_tokens = model.Dgenerate(
                  past_key_values=None,
                  input_ids=chat_input,
                  min_new_tokens=5,
                  max_new_tokens=800,
                  streamer=streamer,
              )
              output = drugs.decode(generated_tokens)
              print(
                  f"####\n###\n##\n#\nWRITING TO{path}\n#\n##\n###\n####"
              )
              content_to_append = (
                  f"\nSeed: {seed}\n```\n{output}\n```\n"
              )
              with open(path, "a") as file:
                  file.write(content_to_append)
  
file_path: theta-layer-drugs/sample_generator.py
imports: import time
  import sys
  from drugs.nice_imports import efficiency_stuff
  import torch
  from transformers import AutoTokenizer, TextStreamer, AutoModelForCausalLM
  from drugs.dgenerate import DRUGS
  from sample_generations.to_samples_text import template_stringed_init
  import os
  import json
label_desc: Use image node_id 1 for calling a global function with example usage: runtest(experiment_name, mod_params, mod_type, mod_name, drug_type, precision, filename, base_content, chat_input) without return types