code: def get_dataset_fragments(
      dataset: pq.ParquetDataset, filters: pa.dataset.Expression
  ) -> List[pa.dataset.Fragment]:
      """
      This could be simplified once `split_row_groups=True` is implemented at `pq.ParquetDataset`.
      We could also return a generator instead of list (when getting full infos from S3 may be slow)
      """
      return list(dataset._dataset.get_fragments(filters))
  
imports: from contextlib import contextmanager
  from typing import Dict, Generator, List, Optional, Union
  import numpy
  import pandas
  import pyarrow
  import pyarrow.parquet
  import torch
  from numpy.typing import NDArray
  from pyarrow.dataset import get_partition_keys
  from fairseq2.data import CString
  from fairseq2.data.data_pipeline import DataPipeline, DataPipelineBuilder, read_sequence
label_desc: Use image node_id 6 for calling a global function with example usage: get_dataset_fragments(dataset, filters) and returns: list