code: def constrain_params(params_unconstrained, bijector_name):
      """Constrains a parameters dictionary to a bijector's parameter space."""
      # Constrain them to legal values
      params_constrained = constraint_for(bijector_name)(
          params_unconstrained
      )
  
      # Sometimes the "bijector constraint" fn may replace c2t-tracking
      # DeferredTensor params with Tensor params (e.g. fix_triangular). In such
      # cases, we preserve the c2t-tracking DeferredTensors by wrapping them but
      # ignoring the value.  We similarly reinstate raw tf.Variables, so they
      # appear in the bijector's `variables` list and can be initialized.
      for k in params_constrained:
          if (
              k in params_unconstrained
              and isinstance(
                  params_unconstrained[k],
                  (tfp_util.DeferredTensor, tf.Variable),
              )
              and params_unconstrained[k] is not params_constrained[k]
          ):
  
              def constrained_value(
                  v, val=params_constrained[k]
              ):  # pylint: disable=cell-var-from-loop
                  # While the gradient to v will be 0, we only care about the c2t
                  # counts.
                  return v * 0 + val
  
              params_constrained[k] = tfp_util.DeferredTensor(
                  params_unconstrained[k], constrained_value
              )
      hp.note(
          "Forming bijector {} with constrained parameters {}".format(
              bijector_name, params_constrained
          )
      )
      return params_constrained
  
imports: import collections
  import functools
  from absl.testing import parameterized
  import hypothesis
  from hypothesis import strategies
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python import bijectors
  from tensorflow_probability.python import util
  from tensorflow_probability.python.bijectors import hypothesis_testlib
  from tensorflow_probability.python.bijectors import invert
  from tensorflow_probability.python.internal import auto_composite_tensor
  from tensorflow_probability.python.internal import hypothesis_testlib
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
  from tensorflow.python.util import nest
label_desc: Use image node_id 16 for calling a global function with example usage: constrain_params(params_unconstrained, bijector_name) and returns: params_constrained, unknown