code: def test_deeply_nested(self):
      results = _build_deeply_nested(0, 1, 2, 3, 4)
      self.assertTrue(unnest.has_nested(results, "unique_nesting"))
      self.assertTrue(
          unnest.has_nested(results, "unique_atypical_nesting")
      )
      self.assertTrue(unnest.has_nested(results, "unique_core"))
      self.assertFalse(hasattr(self, "unique_core"))
      self.assertFalse(unnest.has_nested(results, "foo"))
      self.assertEqual(
          unnest.get_innermost(results, "unique_nesting"), 3
      )
      self.assertEqual(
          unnest.get_outermost(results, "unique_nesting"), 0
      )
      self.assertEqual(
          unnest.get_innermost(results, "unique_atypical_nesting"), 2
      )
      self.assertEqual(
          unnest.get_outermost(results, "unique_atypical_nesting"), 1
      )
      self.assertEqual(unnest.get_innermost(results, "unique_core"), 4)
      self.assertEqual(unnest.get_outermost(results, "unique_core"), 4)
      self.assertRaises(
          AttributeError, lambda: unnest.get_innermost(results, "foo")
      )
      self.assertRaises(
          AttributeError, lambda: unnest.get_outermost(results, "foo")
      )
      self.assertIs(
          unnest.get_innermost(results, "foo", SINGLETON), SINGLETON
      )
      self.assertIs(
          unnest.get_outermost(results, "foo", SINGLETON), SINGLETON
      )
  
imports: import collections
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.internal import unnest
label_desc: Use image node_id 4 for calling the TestNestedAccessors obj's underlying member method code with example usage: obj.test_deeply_nested() without return types