code: def test_plot_shared_submodel(teardown, tmp_path, expand_nested):
      xs, y_ts, y_ps = [], [], []
      submodel = build_submodel(LogisticRegression(), 0)
  
      for i in range(2):
          x = Input(name="x{}".format(i))
          y_t = Input(name="y_t{}".format(i))
          y_p = submodel(x, y_t)
          xs.append(x)
          y_ts.append(y_t)
          y_ps.append(y_p)
  
      model = Model(xs, y_ps, y_ts)
  
      filename = str(tmp_path / PNG_FILENAME)
      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 3 for calling a global function with example usage: test_plot_shared_submodel(teardown, tmp_path, expand_nested) without return types