def _check_axes_shape(self, axes, axes_num=None, layout=None,<EOL>figsize=None):
if figsize is None:<EOL><INDENT>figsize = self.default_figsize<EOL><DEDENT>visible_axes = self._flatten_visible(axes)<EOL>if axes_num is not None:<EOL><INDENT>assert len(visible_axes) == axes_num<EOL>for ax in visible_axes:<EOL><INDENT>assert len(ax.get_children()) > <NUM_LIT:0><EOL><DEDENT><DEDENT>if layout is not None:<EOL><INDENT>result = self._get_axes_layout(_flatten(axes))<EOL>assert result == layout<EOL><DEDENT>tm.assert_numpy_array_equal(<EOL>visible_axes[<NUM_LIT:0>].figure.get_size_inches(),<EOL>np.array(figsize, dtype=np.float64))<EOL>
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