code: def assert_heap_sorted(heap: HeapSet) -> None:
      assert heap._sorted
      assert heap._heap == sorted(heap._heap)
  
imports: from __future__ import annotations
  import heapq
  import operator
  import pickle
  import random
  from collections.abc import Mapping
  import pytest
  from distributed.collections import LRU, HeapSet, sum_mappings
label_desc: Use image node_id 3 for calling a global function with example usage: assert_heap_sorted(heap) without return types