code: def test_unpack_frames_remainder(extra):
      frames = [b"123", b"asdf"]
      b = pack_frames(frames)
      assert isinstance(b, bytes)
  
      frames2 = unpack_frames(b + extra)
      assert frames2 == frames
  
      frames2 = unpack_frames(b + extra, remainder=True)
      assert isinstance(frames2[-1], memoryview)
      assert frames2 == frames + [extra]
  
file_path: distributed/distributed/protocol/tests/test_protocol_utils.py
imports: from __future__ import annotations
  import pytest
  from distributed.protocol.utils import merge_memoryviews, pack_frames, pack_frames_prelude, unpack_frames
label_desc: Use image node_id 2 for calling a global function with example usage: test_unpack_frames_remainder(extra) without return types