code: def _transform_distribution(dist, mean, magnitude):
      """Scales the input normal distribution to be within the action limits.
  
      Args:
        dist: a TensorFlow distribution.
        mean: desired action means.
        magnitude: desired action magnitudes.
  
      Returns:
        A transformed distribution, scaled to within the action limits.
      """
      bijectors = tfb.Chain(
          [
              tfb.Shift(mean)(tfb.Scale(magnitude)),
              _Tanh(),
          ]
      )
      dist = tfd.TransformedDistribution(dist, bijectors)
      return dist
  
imports: import functools
  import operator
  from typing import NamedTuple, Optional, Tuple
  from flax import linen
  import gin
  import jax
  from jax import numpy
  import tensorflow
  from tensorflow_probability.substrates import jax
label_desc: Use image node_id 1 for calling a global function with example usage: _transform_distribution(dist, mean, magnitude) and returns: dist