code: def def_linear(fun):
      """Flags that a function is linear wrt all args"""
      defjvp_argnum(
          fun,
          lambda argnum, g, ans, args, kwargs: fun(
              *subval(args, argnum, g), **kwargs
          ),
      )
  
imports: from itertools import count
  from functools import reduce
  from .tracer import trace, primitive, toposort, Node, Box, isbox, getval
  from .util import func, subval
  import warnings
label_desc: Use image node_id 12 for calling a global function with example usage: def_linear(fun) without return types