code: def test_write_pinned_buffer(tmpdir):
      data_fname = tmpdir.join("test_read.sigmf-data")
  
      actual = cp.random.rand(100).astype(cp.complex64)
  
      cusignal.write_bin(str(data_fname), actual)
  
      binary = cusignal.read_bin(str(data_fname), dtype=cp.complex64)
      buffer = cusignal.get_pinned_mem(binary.shape, cp.complex64)
  
      cusignal.write_bin(
          str(data_fname), actual, buffer=buffer, append=False
      )
  
      expect = cusignal.read_bin(str(data_fname), buffer=buffer)
  
      cp.testing.assert_array_equal(actual, expect)
  
imports: import cupy
  import cusignal
label_desc: Use image node_id 5 for calling a global function with example usage: test_write_pinned_buffer(tmpdir) without return types