code: def test_works_for_nested_namedtuple(self):
      Results = collections.namedtuple(
          "Results", ["field1", "inner"]
      )  # pylint: disable=invalid-name
      InnerResults = collections.namedtuple(
          "InnerResults", ["fieldA", "fieldB"]
      )  # pylint: disable=invalid-name
      accepted = Results(
          field1=np.int32([1, 3]),
          inner=InnerResults(
              fieldA=np.float32([5, 7]),
              fieldB=[
                  np.float32([9, 11]),
                  np.float64([13, 15]),
              ],
          ),
      )
      rejected = Results(
          field1=np.int32([0, 2]),
          inner=InnerResults(
              fieldA=np.float32([4, 6]),
              fieldB=[
                  np.float32([8, 10]),
                  np.float64([12, 14]),
              ],
          ),
      )
      chosen = util.choose(
          tf.constant([False, True]), accepted, rejected
      )
      chosen_ = self.evaluate(chosen)
      # Lhs should be 0,4,8,12 and rhs=lhs+3.
      expected = Results(
          field1=np.int32([0, 3]),
          inner=InnerResults(
              fieldA=np.float32([4, 7]),
              fieldB=[
                  np.float32([8, 11]),
                  np.float64([12, 15]),
              ],
          ),
      )
      self.assertAllClose(expected, chosen_, atol=0.0, rtol=1e-5)
  
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 1 for calling the ChooseTest obj's underlying member method code with example usage: obj.test_works_for_nested_namedtuple() without return types