code: def linearity_1d_handler(input_ind, explainer, op, *grads):
      # make sure only the given input varies (negative means only that input cannot vary, and is measured from the end of the list)
      for i in range(len(op.inputs)):
          if i != input_ind:
              assert not explainer._variable_inputs(op)[i], (
                  str(i) + "th input to " + op.name + " cannot vary!"
              )
      if op.type.startswith("shap_"):
          op.type = op.type[5:]
      return explainer.orig_grads[op.type](op, *grads)
  
imports: import warnings
  import numpy
  from packaging import version
  from ...utils._exceptions import DimensionError
  from .._explainer import Explainer
  from ..tf_utils import _get_graph, _get_model_inputs, _get_model_output, _get_session
  from .deep_utils import _check_additivity
label_desc: Use image node_id 14 for calling a global function with example usage: linearity_1d_handler(input_ind, explainer, op) and returns: explainer