code: def assert_linear_time(f):
      t = timefunction(lambda: f(1))
      t10 = timefunction(lambda: f(10))
      assert (
          t10 > 5 * t
      ), "Too fast: f(1) takes {}, f(10) takes {}".format(t, t10)
      assert (
          t10 < 20 * t
      ), "Too slow: f(1) takes {}, f(10) takes {}".format(t, t10)
      if not (8 * t < t10 < 12 * t):
          warnings.warn(
              "Borderline linearity. May fail on different hardware"
          )
  
file_path: autograd/tests/_test_complexity.py
imports: import time
  import warnings
  from autograd import grad, deriv
  import autograd.numpy
  from autograd.builtins import list
label_desc: Use image node_id 2 for calling a global function with example usage: assert_linear_time(f) without return types