code: def test_identitybatch_batch_process(
      func, items, batch_size, expected, monkeypatch
  ):
      class SomeModel(Model):
          def _predict(self, item):
              return item
  
      m = SomeModel()
      monkeypatch.setattr(m, "_predict_batch", func)
      if batch_size:
          assert (
              m.predict_batch(items, batch_size=batch_size) == expected
          )
      else:
          assert m.predict_batch(items) == expected
  
file_path: modelkit/tests/test_batching.py
imports: import asyncio
  import pytest
  from modelkit.core.model import AsyncModel, Model
label_desc: Use image node_id 3 for calling a global function with example usage: test_identitybatch_batch_process(func, items, batch_size, expected, monkeypatch) and returns: item