class_docstr: Override the mode function of the distribution.
  
  For non-constant Jacobian transformed distributions, the mode is non-trivial
  to compute, so for these distributions the mode function is not supported in
  TFP. A frequently used approximation is to forward transform the mode of the
  untransformed distribution.
  
  Otherwise (an untransformed distribution or a transformed distribution with a
  constant Jacobian), this is a no-op.
code: def __call__(self, inputs: tfd.Distribution) -> tfd.Distribution:
      if isinstance(inputs, tfd.TransformedDistribution):
          if not inputs.bijector.is_constant_jacobian:
  
              def _mode(self, **kwargs):
                  (
                      distribution_kwargs,
                      bijector_kwargs,
                  ) = self._kwargs_split_fn(kwargs)
                  x = self.distribution.mode(**distribution_kwargs)
                  y = self.bijector.forward(x, **bijector_kwargs)
                  return y
  
              inputs._mode = types.MethodType(_mode, inputs)
      return inputs
  
imports: import types
  from typing import Optional, Union
  from absl import logging
  from acme.tf.networks import distributions
  import numpy
  import sonnet
  import tensorflow
  import tensorflow_probability
label_desc: Use image node_id 1 for calling the ApproximateMode obj's underlying member method code with example usage: obj.__call__(inputs) and returns: inputs, y