code: def test_contains(self):
      # Initially xaxis and xaxis1 are `in` layout, but xaxis2 and 3 are not
      self.assertTrue("xaxis" in self.layout)
      self.assertTrue("xaxis1" in self.layout)
      self.assertFalse("xaxis2" in self.layout)
      self.assertFalse("xaxis3" in self.layout)
  
      # xaxis is in iter props, but xaxis1, 2, and 3 are not
      iter_props = list(self.layout)
      self.assertIn("xaxis", iter_props)
      self.assertNotIn("xaxis1", iter_props)
      self.assertNotIn("xaxis2", iter_props)
      self.assertNotIn("xaxis3", iter_props)
  
      # test dir props (these drive ipython tab completion)
      dir_props = self.layout.__dir__()
      self.assertIn("xaxis", dir_props)
      self.assertNotIn("xaxis1", dir_props)
      self.assertNotIn("xaxis2", dir_props)
      self.assertNotIn("xaxis3", dir_props)
  
      # Initialize xaxis2
      self.layout.xaxis2 = {}
      self.assertTrue("xaxis" in self.layout)
      self.assertTrue("xaxis1" in self.layout)
      self.assertTrue("xaxis2" in self.layout)
      self.assertFalse("xaxis3" in self.layout)
  
      # xaxis and xaxis2 are in iter props
      iter_props = list(self.layout)
      self.assertIn("xaxis", iter_props)
      self.assertNotIn("xaxis1", iter_props)
      self.assertIn("xaxis2", iter_props)
      self.assertNotIn("xaxis3", iter_props)
  
      # test dir props
      dir_props = self.layout.__dir__()
      self.assertIn("xaxis", dir_props)
      self.assertNotIn("xaxis1", dir_props)
      self.assertIn("xaxis2", dir_props)
      self.assertNotIn("xaxis3", dir_props)
  
      # Initialize xaxis3
      self.layout["xaxis3"] = {}
      self.assertTrue("xaxis" in self.layout)
      self.assertTrue("xaxis1" in self.layout)
      self.assertTrue("xaxis2" in self.layout)
      self.assertTrue("xaxis3" in self.layout)
  
      # xaxis, xaxis2, and xaxis3 are in iter props
      iter_props = list(self.layout)
      self.assertIn("xaxis", iter_props)
      self.assertNotIn("xaxis1", iter_props)
      self.assertIn("xaxis2", iter_props)
      self.assertIn("xaxis3", iter_props)
  
      # test dir props
      dir_props = self.layout.__dir__()
      self.assertIn("xaxis", dir_props)
      self.assertNotIn("xaxis1", dir_props)
      self.assertIn("xaxis2", dir_props)
      self.assertIn("xaxis3", dir_props)
  
file_path: plotly.py/packages/python/plotly/plotly/tests/test_core/test_graph_objs/test_layout_subplots.py
imports: from unittest import TestCase
  import pytest
  import plotly.graph_objs
  import plotly.io
label_desc: Use image node_id 8 for calling the TestLayoutSubplots obj's underlying member method code with example usage: obj.test_contains() without return types