code: def test_plot_nested_submodels(
      teardown, tmp_path, levels, expand_nested
  ):
      submodels = [LogisticRegression()]
      for level in range(levels):
          sub_model = build_submodel(submodels[level], level + 1)
          submodels.append(sub_model)
  
      x = Input(name="x")
      y_t = Input(name="y_t")
      y_p = submodels[-1](x, y_t)
      model = Model(x, y_p, y_t)
  
      filename = str(tmp_path / "test_plot_model.png")
      plot_model(
          model, filename, show=False, expand_nested=expand_nested
      )
  
file_path: baikal/tests/test_plot.py
imports: import pytest
  from baikal import Model, Input
  from baikal.plot import plot_model
  from tests.helpers.fixtures import teardown
  from tests.helpers.dummy_steps import DummyMIMO, DummySIMO, DummySISO, DummyMISO
  from tests.helpers.sklearn_steps import LogisticRegression
label_desc: Use image node_id 4 for calling a global function with example usage: test_plot_nested_submodels(teardown, tmp_path, levels, expand_nested) without return types