code: def test_resnet():
      torchvision = pytest.importorskip("torchvision")
      model = torchvision.models.resnet.resnet18()
  
      header, frames = serialize(model)
      model2 = deserialize(header, frames)
      assert str(model) == str(model2)
  
imports: from __future__ import annotations
  import pytest
  from distributed.protocol import deserialize, serialize
label_desc: Use image node_id 3 for calling a global function with example usage: test_resnet() without return types