code: def test_flat(self):
      results = FakeResults(0)
      self.assertTrue(unnest.has_nested(results, "unique_core"))
      self.assertFalse(unnest.has_nested(results, "foo"))
      self.assertEqual(
          results.unique_core,
          unnest.get_innermost(results, "unique_core"),
      )
      self.assertEqual(
          results.unique_core,
          unnest.get_outermost(results, "unique_core"),
      )
      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 1 for calling the TestNestedAccessors obj's underlying member method code with example usage: obj.test_flat() without return types