code: def test_choose_from(self):
      options = [
          [{"value": 1.0}, (2.0, 3)],
          [{"value": 2.0}, (3.0, 4)],
          [{"value": 3.0}, (4.0, 5)],
      ]
      first_option = util.choose_from(tf.constant(0), options)
      second_option = util.choose_from(tf.constant(1), options)
      third_option = util.choose_from(2, options)
      negative_option = util.choose_from(tf.constant(-10), options)
      large_option = util.choose_from(tf.constant(10), options)
      self.assertAllEqualNested(
          first_option, options[0], check_types=True
      )
      self.assertAllEqualNested(
          second_option, options[1], check_types=True
      )
      self.assertAllEqualNested(
          third_option, options[2], check_types=True
      )
      self.assertAllEqualNested(
          negative_option, options[0], check_types=True
      )
      self.assertAllEqualNested(
          large_option, options[2], check_types=True
      )
  
imports: import collections
  import warnings
  from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import lognormal
  from tensorflow_probability.python.distributions import mvn_tril
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.mcmc.internal import util
label_desc: Use image node_id 4 for calling the ChooseTest obj's underlying member method code with example usage: obj.test_choose_from() without return types