code: def _parquet_to_frame(
      paths_or_buffers,
      *args,
      row_groups=None,
      partition_keys=None,
      partition_categories=None,
      dataset_kwargs=None,
      **kwargs,
  ):
      # If this is not a partitioned read, only need
      # one call to `_read_parquet`
      if not partition_keys:
          return _read_parquet(
              paths_or_buffers,
              *args,
              row_groups=row_groups,
              **kwargs,
          )
  
      partition_meta = None
      partitioning = (dataset_kwargs or {}).get("partitioning", None)
      if hasattr(partitioning, "schema"):
          partition_meta = cudf.DataFrame.from_arrow(
              partitioning.schema.empty_table()
          )
  
      # For partitioned data, we need a distinct read for each
      # unique set of partition keys. Therefore, we start by
      # aggregating all paths with matching keys using a dict
      plan = {}
      for i, (keys, path) in enumerate(
          zip(partition_keys, paths_or_buffers)
      ):
          rgs = row_groups[i] if row_groups else None
          tkeys = tuple(keys)
          if tkeys in plan:
              plan[tkeys][0].append(path)
              if rgs is not None:
                  plan[tkeys][1].append(rgs)
          else:
              plan[tkeys] = ([path], None if rgs is None else [rgs])
  
      dfs = []
      for part_key, (key_paths, key_row_groups) in plan.items():
          # Add new DataFrame to our list
          dfs.append(
              _read_parquet(
                  key_paths,
                  *args,
                  row_groups=key_row_groups,
                  **kwargs,
              )
          )
          # Add partition columns to the last DataFrame
          for name, value in part_key:
              _len = len(dfs[-1])
              if partition_categories and name in partition_categories:
                  # Build the categorical column from `codes`
                  codes = full(
                      size=_len,
                      fill_value=partition_categories[name].index(
                          value
                      ),
                  )
                  dfs[-1][name] = build_categorical_column(
                      categories=partition_categories[name],
                      codes=codes,
                      size=codes.size,
                      offset=codes.offset,
                      ordered=False,
                  )
              else:
                  # Not building categorical columns, so
                  # `value` is already what we want
                  _dtype = (
                      partition_meta[name].dtype
                      if partition_meta is not None
                      else None
                  )
                  if pd.isna(value):
                      dfs[-1][name] = column_empty(
                          row_count=_len,
                          dtype=_dtype,
                          masked=True,
                      )
                  else:
                      dfs[-1][name] = full(
                          size=_len,
                          fill_value=value,
                          dtype=_dtype,
                      )
  
      # Concatenate dfs and return.
      # Assume we can ignore the index if it has no name.
      return (
          cudf.concat(dfs, ignore_index=dfs[-1].index.name is None)
          if len(dfs) > 1
          else dfs[0]
      )
  
imports: from __future__ import annotations
  import itertools
  import math
  import operator
  import shutil
  import tempfile
  import warnings
  from collections import defaultdict
  from contextlib import ExitStack
  from functools import partial, reduce
  from typing import Callable, Dict, List, Optional, Tuple
  from uuid import uuid4
  import numpy
  import pandas
  from pyarrow import dataset
  import cudf
  from cudf._lib import parquet
  from cudf.api.types import is_list_like
  from cudf.core.column import build_categorical_column, column_empty, full
  from cudf.utils import ioutils
  from cudf.utils.nvtx_annotation import _cudf_nvtx_annotate
label_desc: Use image node_id 8 for calling a global function with example usage: _parquet_to_frame(paths_or_buffers) and returns: unknown, _read_parquet