code: def test_raise_exception_if_wrong_model_instance():
      regr = linear_model_tree(X=X, y=Y)
      wrong_summary_dict = regr.summary()
      del wrong_summary_dict[1]
      input_bounds = {
          0: (min(X[:, 0]), max(X[:, 0])),
          1: (min(X[:, 1]), max(X[:, 1])),
      }
      with pytest.raises(
          Exception,
          match="Input dict must be the summary of the linear-tree model"
          + " e.g. dict = model.summary()",
      ):
          ltmodel_small = LinearTreeDefinition(
              regr.summary(only_leaves=True),
              scaled_input_bounds=input_bounds,
          )
      with pytest.raises(
          Exception,
          match="Model entry must be dict or linear-tree instance",
      ):
          ltmodel_small = LinearTreeDefinition(
              (0, 0), scaled_input_bounds=input_bounds
          )
      with pytest.raises(
          Exception,
          match="Input dict must be the summary of the linear-tree model"
          + " e.g. dict = model.summary()",
      ):
          ltmodel_small = LinearTreeDefinition(
              wrong_summary_dict, scaled_input_bounds=input_bounds
          )
  
imports: import numpy
  import pyomo.environ
  import pytest
  from omlt.dependencies import lineartree_available
  from pytest import approx
  from omlt import OmltBlock
  import omlt
label_desc: Use image node_id 14 for calling a global function with example usage: test_raise_exception_if_wrong_model_instance() without return types