code: def check_basic(tmpd):
      rb = PersistentRandomAccessQueue(tmpd, 16)
      assert 16 == rb.maxlen
  
      data = {0x42: "pocketburger"}
      rb.append(data)
      x = rb.sample(1)
      assert [data] == x
      assert data == x[0]
      assert 1 == len(rb)
      del x
  
      rb.popleft()
      assert 0 == len(rb)
  
      deadbeefs = []
      for i in range(10):
          assert i == len(rb)
          data = (0x42 + i, "deadbeef")
          rb.append(data)
          deadbeefs.append(data)
  
      assert 10 == len(rb)
      samples = rb.sample(10)
      assert sorted(deadbeefs) == sorted(samples)
  
      for i in range(10):
          data = (0x52 + i, "deadbeef")
          rb.append(data)
          deadbeefs.append(data)
  
      assert 16 == len(rb)
      deadbeefs = deadbeefs[-16:]
      samples = rb.sample(16)
      assert samples != sorted(samples)
      assert deadbeefs == sorted(samples)
  
imports: import tempfile
  import pytest
  from pfrl.collections.persistent_collections import PersistentRandomAccessQueue
label_desc: Use image node_id 1 for calling a global function with example usage: check_basic(tmpd) without return types