code: def path_to_pickled_model(global_tmp_dir, trained_model):
      p = global_tmp_dir / "model.pickle"
      p.write_bytes(pickle.dumps(trained_model))
      return p
  
file_path: m2cgen/tests/conftest.py
imports: import io
  import pickle
  import pytest
  from sklearn.linear_model import LinearRegression
  from tests.utils import get_regression_model_trainer, tmp_dir
label_desc: Use image node_id 6 for calling a global function with example usage: path_to_pickled_model(global_tmp_dir, trained_model) and returns: p