docstr: Turn a set of row-groups into bytes-serialized form
  using thrift via pickle.
docstr_tok: ["Turn","a","set","of","row-groups","into","bytes-serialized","form","using","thrift","via","pickle","."]
code: def _get_thrift_row_groups(
      cls,
      pf,
      filename,
      row_groups,
  ):
      """Turn a set of row-groups into bytes-serialized form
      using thrift via pickle.
      """
  
      real_row_groups = []
      for _, rg_global in row_groups:
          row_group = pf.row_groups[rg_global]
          columns = row_group.columns
          for c, col in enumerate(columns):
              if c:
                  col.file_path = None
              md = col.meta_data
              md.key_value_metadata = None
              # NOTE: Fastparquet may need the null count in the
              # statistics, so we cannot just set statistics
              # to none.  Set attributes separately:
              st = md.statistics
              if st:
                  st.distinct_count = None
                  st.max = None
                  st.min = None
                  st.max_value = None
                  st.min_value = None
              md.encodings = None
              md.total_uncompressed_size = None
              md.encoding_stats = None
          row_group.columns = columns
          real_row_groups.append(row_group)
      return real_row_groups
  
imports: from __future__ import annotations
  import copy
  import pickle
  import threading
  import warnings
  from collections import OrderedDict, defaultdict
  from contextlib import ExitStack
  import numpy
  import pandas
  import tlz
  from packaging.version import parse
  from dask.core import flatten
  from dask.dataframe._compat import PANDAS_GE_201
  from dask.base import tokenize
  from dask.dataframe.io.parquet.utils import Engine, _get_aggregation_depth, _infer_split_row_groups, _normalize_index_columns, _parse_pandas_metadata, _process_open_file_options, _row_groups_to_parts, _set_gather_statistics, _set_metadata_task_size, _sort_and_analyze_paths
  from dask.dataframe.io.utils import _is_local_fs, _meta_from_dtypes, _open_input_files
  from dask.dataframe.utils import UNKNOWN_CATEGORIES
  from dask.delayed import Delayed
  from dask.utils import natural_sort_key
label_desc: Use image node_id 2 for calling the FastParquetEngine obj's underlying member method code with example usage: obj._get_thrift_row_groups(cls, pf, filename, row_groups) and returns: real_row_groups