code: def test_unpack_frames_partial():
      frames = [b"123", b"asdf"]
      frames.insert(0, pack_frames_prelude(frames))
  
      frames2, missing_lenghts = unpack_frames(
          b"".join(frames), partial=True
      )
      assert frames2 == frames[1:]
      assert missing_lenghts == []
  
      frames2, missing_lenghts = unpack_frames(
          b"".join(frames[:-1]), partial=True
      )
      assert frames2 == frames[1:-1]
      assert missing_lenghts == [4]
  
      frames2, missing_lenghts = unpack_frames(frames[0], partial=True)
      assert frames2 == []
      assert missing_lenghts == [3, 4]
  
      with pytest.raises(AssertionError):
          unpack_frames(b"".join(frames[:-1]))
  
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 3 for calling a global function with example usage: test_unpack_frames_partial() without return types