code: def serialize(o: object) -> tuple[U, str, int, bool]:
      import pandas as pd
      import pyarrow as pa
      from pyarrow import parquet as pq
  
      if not isinstance(o, pd.DataFrame):
          return "", "", 0, False
  
      # for now, we *always* serialize into in memory
      # until we have a generic backend that manages
      # sinks
      table = pa.Table.from_pandas(o)
      buf = pa.BufferOutputStream()
      pq.write_table(table, buf, compression="snappy")
  
      return (
          buf.getvalue().hex().decode("utf-8"),
          qualname(o),
          __version__,
          True,
      )
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING
  from airflow.utils.module_loading import qualname
label_desc: Use image node_id 1 for calling a global function with example usage: serialize(o) and returns: buf,  qualname,  __version__,  True, str,  str,  int,  False