code: def _multiply_gradients(grads_and_vars, gradient_multipliers):
      """Multiply specified gradients."""
      multiplied_grads_and_vars = []
      for grad, var in grads_and_vars:
          if grad is not None and (
              var in gradient_multipliers
              or var.name in gradient_multipliers
          ):
              key = var if var in gradient_multipliers else var.name
              multiplier = gradient_multipliers[key]
              if isinstance(grad, ops.IndexedSlices):
                  grad_values = grad.values * multiplier
                  grad = ops.IndexedSlices(
                      grad_values, grad.indices, grad.dense_shape
                  )
              else:
                  grad *= math_ops.cast(multiplier, grad.dtype)
          multiplied_grads_and_vars.append((grad, var))
      return multiplied_grads_and_vars
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import six
  from ..None import contrib_framework
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import clip_ops
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import init_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.ops import variables
  from tensorflow.python.summary import summary
  from tensorflow.python.training import moving_averages
  from tensorflow.python.training import optimizer
  from tensorflow.python.training import training
label_desc: Use image node_id 6 for calling a global function with example usage: _multiply_gradients(grads_and_vars, gradient_multipliers) and returns: multiplied_grads_and_vars