code: def _compute_partials(samples, loc, concentration):
      """Compute the Implicit Gradients for the samples."""
      # The implicit gradient here is derived in Appendix H.1 of [1].
      # Note that [1] uses the parametermization (1 / loc, concentration), and the
      # formula below are modified accordingly.
      # References
      # [1] W. Lin, M. Schmidt, M. Khan. Handling the Positive-Definite Constraint
      # in the Bayesian Learning Rule. https://arxiv.org/abs/2002.10060v8
      dtype = dtype_util.common_dtype(
          [samples, loc, concentration], tf.float32
      )
      numpy_dtype = dtype_util.as_numpy_dtype(dtype)
      norm = normal.Normal(numpy_dtype(0.0), numpy_dtype(1.0))
      z = -tf.math.sqrt(concentration / samples) * (samples / loc + 1.0)
      log_mills_ratio = norm.log_cdf(z) - norm.log_prob(z)
      partial_c = (
          numpy_dtype(np.log(2.0))
          - tf.math.log(loc)
          - 0.5 * tf.math.log(concentration)
          + 1.5 * tf.math.log(samples)
          + log_mills_ratio
      )
      partial_c = samples / concentration - tf.math.exp(partial_c)
  
      partial_l = (
          numpy_dtype(np.log(2.0))
          + 0.5 * tf.math.log(concentration)
          + 1.5 * tf.math.log(samples)
          + log_mills_ratio
      )
      # We divide by -loc**2, since we need to take in to account that [1] is
      # parameterized by 1 / loc (hence by the chain rule we incur a - 1 / loc**2
      # factor, where the negative sign is cancelled out.
      partial_l = tf.math.exp(partial_l) / tf.math.square(loc)
      return partial_c, partial_l
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import chain
  from tensorflow_probability.python.bijectors import exp
  from tensorflow_probability.python.bijectors import scale
  from tensorflow_probability.python.bijectors import softplus
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import custom_gradient
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import reparameterization
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import special_math
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.math import generic
label_desc: Use image node_id 3 for calling a global function with example usage: _compute_partials(samples, loc, concentration) and returns: partial_c,  partial_l