code: def _apply_gradients(opt, g, v):
      gvs = tuple(
          (g_, v_)
          for g_, v_ in zip(tf.nest.flatten(g), tf.nest.flatten(v))
          if g_ is not None
      )
      if gvs:
          opt.apply_gradients(gvs)
  
imports: import collections
  import contextlib
  import functools
  import sys
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import tensorshape_util
label_desc: Use image node_id 6 for calling a global function with example usage: _apply_gradients(opt, g, v) without return types