code: def norm_jvp(g, ans, x, ord=None, axis=None):
      def check_implemented():
          matrix_norm = (x.ndim == 2 and axis is None) or isinstance(
              axis, tuple
          )
  
          if matrix_norm:
              if not (ord is None or ord == "fro" or ord == "nuc"):
                  raise NotImplementedError(
                      "Gradient of matrix norm not "
                      "implemented for ord={}".format(ord)
                  )
          elif not (ord is None or ord > 1):
              raise NotImplementedError(
                  "Gradient of norm not "
                  "implemented for ord={}".format(ord)
              )
  
      if axis is None:
          contract = lambda a: anp.sum(a)
      else:
          contract = partial(anp.sum, axis=axis)
  
      if ord == "nuc":
          if axis is None:
              roll = lambda a: a
              unroll = lambda a: a
          else:
              row_axis, col_axis = axis
              if row_axis > col_axis:
                  row_axis = row_axis - 1
              # Roll matrix axes to the back
              roll = lambda a: anp.rollaxis(
                  anp.rollaxis(a, col_axis, a.ndim),
                  row_axis,
                  a.ndim - 1,
              )
              # Roll matrix axes to their original position
              unroll = lambda a: anp.rollaxis(
                  anp.rollaxis(a, a.ndim - 2, row_axis),
                  a.ndim - 1,
                  col_axis,
              )
  
      check_implemented()
      if ord in (None, 2, "fro"):
          return contract(g * x) / ans
      elif ord == "nuc":
          x_rolled = roll(x)
          u, s, vt = svd(x_rolled, full_matrices=False)
          uvt_rolled = _dot(u, vt)
          # Roll the matrix axes back to their correct positions
          uvt = unroll(uvt_rolled)
          return contract(g * uvt)
      else:
          # see https://en.wikipedia.org/wiki/Norm_(mathematics)#p-norm
          return contract(g * x * anp.abs(x) ** (ord - 2)) / ans ** (
              ord - 1
          )
  
file_path: autograd/autograd/numpy/linalg.py
imports: from __future__ import absolute_import
  from functools import partial
  import numpy.linalg
  from .numpy_wrapper import wrap_namespace
  from .None import numpy_wrapper
  from autograd.extend import defvjp, defjvp
label_desc: Use image node_id 8 for calling a global function with example usage: norm_jvp(g, ans, x, ord, axis) and returns: unknown, contract, unknown