code: def write_compressed_ipc_file(
      path: Path, compression: str, stream: bool = False
  ):
      schema = pa.schema(
          [
              pa.field("integers", pa.int32()),
              pa.field("floats", pa.float32()),
          ]
      )
  
      integers = pa.array(range(100), type=pa.int32())
      floats = pa.array(
          (x * 0.1 for x in range(100)), type=pa.float32()
      )
      batch = pa.record_batch([integers, floats], schema)
  
      options = pa.ipc.IpcWriteOptions(compression=compression)
  
      with pa.OSFile(path.as_posix(), "wb") as sink:
          if stream:
              with pa.ipc.new_stream(
                  sink, schema, options=options
              ) as writer:
                  writer.write(batch)
          else:
              with pa.ipc.new_file(
                  sink, schema, options=options
              ) as writer:
                  writer.write(batch)
  
label_desc: Use image node_id 1 for calling a global function with example usage: write_compressed_ipc_file(path, compression, stream) without return types