code: def test_false_split():
      # if you ask it to be divided in only one piece, just return the original
      # one
      pure_square = [0.0, 0.0, 1.0, 1.0]
      conf_h = dict(proportion=[1], gap=0.0, horizontal=True)
      conf_v = dict(proportion=[1], gap=0.0, horizontal=False)
      eq(_split_rect(*pure_square, **conf_h), pure_square)
      eq(_split_rect(*pure_square, **conf_v), pure_square)
      conf_h = dict(proportion=[1], gap=0.5, horizontal=True)
      conf_v = dict(proportion=[1], gap=0.5, horizontal=False)
      eq(_split_rect(*pure_square, **conf_h), pure_square)
      eq(_split_rect(*pure_square, **conf_v), pure_square)
  
      # identity on a void rectangle should not give anything strange
      null_square = [0.0, 0.0, 0.0, 0.0]
      conf = dict(proportion=[1], gap=0.0, horizontal=True)
      eq(_split_rect(*null_square, **conf), null_square)
      conf = dict(proportion=[1], gap=1.0, horizontal=True)
      eq(_split_rect(*null_square, **conf), null_square)
  
      # splitting a negative rectangle should raise error
      neg_square = [0.0, 0.0, -1.0, 0.0]
      conf = dict(proportion=[1], gap=0.0, horizontal=True)
      assert_raises(ValueError, _split_rect, *neg_square, **conf)
      conf = dict(proportion=[1, 1], gap=0.0, horizontal=True)
      assert_raises(ValueError, _split_rect, *neg_square, **conf)
      conf = dict(proportion=[1], gap=0.5, horizontal=True)
      assert_raises(ValueError, _split_rect, *neg_square, **conf)
      conf = dict(proportion=[1, 1], gap=0.5, horizontal=True)
      assert_raises(ValueError, _split_rect, *neg_square, **conf)
  
imports: from statsmodels.compat.python import lrange
  from io import BytesIO
  from itertools import product
  import numpy
  from numpy.testing import assert_, assert_raises
  import pandas
  import pytest
  from statsmodels.api import datasets
  from statsmodels.graphics.mosaicplot import _hierarchical_split, _key_splitting, _normalize_split, _reduce_dict, _split_rect, mosaic
label_desc: Use image node_id 11 for calling a global function with example usage: test_false_split() without return types