code: def _transform_to_interval(constraint):
      # Handle the special case of the unit interval.
      lower_is_0 = (
          isinstance(constraint._lower_bound, Number)
          and constraint._lower_bound == 0
      )
      upper_is_1 = (
          isinstance(constraint._upper_bound, Number)
          and constraint._upper_bound == 1
      )
      if lower_is_0 and upper_is_1:
          return SigmoidTransform()
  
      loc = constraint._lower_bound
      scale = constraint._upper_bound - constraint._lower_bound
      return ComposeTransform(
          [SigmoidTransform(), AffineTransform(loc, scale)]
      )
  
file_path: mxnet/python/mxnet/gluon/probability/transformation/domain_map.py
imports: from numbers import Number
  from .transformation import ExpTransform, AffineTransform, SigmoidTransform, ComposeTransform
  from ..distributions.constraint import Constraint, Positive, GreaterThan, GreaterThanEq, LessThan, Interval, HalfOpenInterval
label_desc: Use image node_id 4 for calling a global function with example usage: _transform_to_interval(constraint) and returns: ComposeTransform, SigmoidTransform