code: def test(table, old_sr, new_sr, device="cpu"):
      x = th.randn(
          16,
          8 * old_sr * int(math.ceil(44_100 / old_sr)),
          device=device,
      )
  
      with Chrono() as chrono:
          y = resample_frac(x, old_sr, new_sr, zeros=56)
      dur_julius = int(1000 * chrono.duration)
  
      if device == "cpu":
          with Chrono() as chrono:
              y_resampy = th.from_numpy(
                  resampy.resample(x.numpy(), old_sr, new_sr)
              )
          dur_resampy = int(1000 * chrono.duration)
  
          delta = (y_resampy - y).abs().mean()
          table.line(
              [
                  old_sr,
                  new_sr,
                  dur_julius,
                  dur_resampy,
                  format(delta, ".1%"),
              ]
          )
      else:
          table.line([old_sr, new_sr, dur_julius])
  
file_path: julius/bench/resample.py
imports: import argparse
  import math
  import resampy
  import torch
  from julius import resample_frac
  from julius.utils import Chrono, MarkdownTable
label_desc: Use image node_id 1 for calling a global function with example usage: test(table, old_sr, new_sr, device) without return types