code: def rq_splines(draw, batch_shape=None, dtype=tf.float32):
      if batch_shape is None:
          batch_shape = draw(tfp_hps.shapes())
  
      lo = draw(hps.floats(min_value=-5, max_value=0.5))
      hi = draw(hps.floats(min_value=-0.5, max_value=5))
      lo, hi = min(lo, hi), max(lo, hi) + 0.2
      hp.note("lo, hi: {!r}".format((lo, hi)))
  
      constraints = dict(
          bin_widths=functools.partial(
              bijector_hps.spline_bin_size_constraint,
              hi=hi,
              lo=lo,
              dtype=dtype,
          ),
          bin_heights=functools.partial(
              bijector_hps.spline_bin_size_constraint,
              hi=hi,
              lo=lo,
              dtype=dtype,
          ),
          knot_slopes=functools.partial(
              bijector_hps.spline_slope_constraint, dtype=dtype
          ),
      )
      params = draw(
          tfp_hps.broadcasting_params(
              batch_shape,
              params_event_ndims=dict(
                  bin_widths=1, bin_heights=1, knot_slopes=1
              ),
              constraint_fn_for=constraints.get,
          )
      )
      hp.note("params: {!r}".format(params))
      return rational_quadratic_spline.RationalQuadraticSpline(
          range_min=lo, validate_args=draw(hps.booleans()), **params
      )
  
imports: import functools
  import hypothesis
  from hypothesis import strategies
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector_test_util
  from tensorflow_probability.python.bijectors import hypothesis_testlib
  from tensorflow_probability.python.bijectors import identity
  from tensorflow_probability.python.bijectors import rational_quadratic_spline
  from tensorflow_probability.python.bijectors import real_nvp
  from tensorflow_probability.python.internal import hypothesis_testlib
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.internal import tf_keras
label_desc: Use image node_id 1 for calling a global function with example usage: rq_splines(draw, batch_shape, dtype) and returns: rational_quadratic_spline