code: def pure_tone(freq, sr=128, dur=4):
      time = th.arange(sr * dur).float() / sr
      return th.cos(2 * math.pi * freq * time)
  
imports: import os
  import tempfile
  import uuid
  from pathlib import Path
  import math
  import random
  import unittest
  import resampy
  import torch
  from julius import resample, ResampleFrac
label_desc: Use image node_id 1 for calling a global function with example usage: pure_tone(freq, sr, dur) and returns: th