class_docstr: Constrain inputs to `[0, 1]`.
code: def __init__(self, kernel, validate_args=False):
      parameters = dict(locals())
      self._kernel = kernel
  
      super(ConstrainToUnit, self).__init__(
          kernel,
          transformation_fn=lambda x, f, e: tf.math.sigmoid(x),
          validate_args=validate_args,
          parameters=parameters,
      )
  
imports: import collections
  import contextlib
  import inspect
  import logging
  import re
  import hypothesis
  from hypothesis.extra import numpy
  import hypothesis.strategies
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.experimental.distributions import marginal_fns
  from tensorflow_probability.python.internal import hypothesis_testlib
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.math import psd_kernels
label_desc: Use image node_id 1 to create a new ConstrainToUnit object from inherited base classes: tfpk with example: obj = ConstrainToUnit(kernel, validate_args)