docstr: Check expected number of axes is drawn in expected layout
  
  Parameters
  ----------
  axes : matplotlib Axes object, or its list-like
  axes_num : number
      expected number of axes. Unnecessary axes should be set to invisible.
  layout :  tuple
      expected layout, (expected number of rows , columns)
  figsize : tuple
      expected figsize. default is matplotlib default
docstr_tok: ["Check","expected","number","of","axes","is","drawn","in","expected","layout","Parameters","--","--","--","--","--","axes",":","matplotlib","Axes","object",",","or","its","list-like","axes_num",":","number","expected","number","of","axes",".","Unnecessary","axes","should","be","set","to","invisible",".","layout",":","tuple","expected","layout",",","(","expected","number","of","rows",",","columns",")","figsize",":","tuple","expected","figsize",".","default","is","matplotlib","default"]
code: def _check_axes_shape(
      self, axes, axes_num=None, layout=None, figsize=(8.0, 6.0)
  ):
      """
      Check expected number of axes is drawn in expected layout
  
      Parameters
      ----------
      axes : matplotlib Axes object, or its list-like
      axes_num : number
          expected number of axes. Unnecessary axes should be set to invisible.
      layout :  tuple
          expected layout, (expected number of rows , columns)
      figsize : tuple
          expected figsize. default is matplotlib default
      """
  
      # derived from pandas.tests.test_graphics
      visible_axes = self._flatten_visible(axes)
  
      if axes_num is not None:
          self.assertEqual(len(visible_axes), axes_num)
          for ax in visible_axes:
              # check something drawn on visible axes
              self.assertTrue(len(ax.get_children()) > 0)
  
      if layout is not None:
          result = self._get_axes_layout(_flatten(axes))
          self.assertEqual(result, layout)
  
      if figsize is not None:
          self.assert_numpy_array_equal(
              np.round(visible_axes[0].figure.get_size_inches()),
              np.array(figsize),
          )
  
imports: import numpy
  import pandas.util.testing
  from pandas_ml.compat import plotting
  from pandas.util.testing import assert_produces_warning, close, RNGContext, assert_index_equal, assert_series_equal, assert_frame_equal, assert_numpy_array_equal
label_desc: Use image node_id 2 for calling the PlottingTestCase obj's underlying member method code with example usage: obj._check_axes_shape(axes, axes_num, layout, figsize) without return types