class_docstr: The default file metadata provider for ParquetDatasource.
  
  Aggregates total block bytes and number of rows using the Parquet file metadata
  associated with a list of Arrow Parquet dataset file fragments.
code: def _get_block_metadata(
      self,
      paths: List[str],
      schema: Optional[Union[type, "pyarrow.lib.Schema"]],
      *,
      num_fragments: int,
      prefetched_metadata: Optional[
          List["pyarrow.parquet.FileMetaData"]
      ],
  ) -> BlockMetadata:
      if (
          prefetched_metadata is not None
          and len(prefetched_metadata) == num_fragments
          and all(m is not None for m in prefetched_metadata)
      ):
          # Fragment metadata was available, construct a normal
          # BlockMetadata.
          block_metadata = BlockMetadata(
              num_rows=sum(m.num_rows for m in prefetched_metadata),
              size_bytes=sum(
                  sum(
                      m.row_group(i).total_byte_size
                      for i in range(m.num_row_groups)
                  )
                  for m in prefetched_metadata
              ),
              schema=schema,
              input_files=paths,
              exec_stats=None,
          )  # Exec stats filled in later.
      else:
          # Fragment metadata was not available, construct an empty
          # BlockMetadata.
          block_metadata = BlockMetadata(
              num_rows=None,
              size_bytes=None,
              schema=schema,
              input_files=paths,
              exec_stats=None,
          )
      return block_metadata
  
imports: import itertools
  import logging
  import os
  import pathlib
  import re
  from typing import TYPE_CHECKING, Any, Callable, Iterator, List, Optional, Tuple, TypeVar, Union
  import numpy
  from ray.data._internal.progress_bar import ProgressBar
  from ray.data._internal.remote_fn import cached_remote_fn
  from ray.data.block import BlockMetadata
  from ray.data.datasource.partitioning import Partitioning
  from ray.util.annotations import DeveloperAPI
label_desc: Use image node_id 1 for calling the DefaultParquetMetadataProvider obj's underlying member method code with example usage: obj._get_block_metadata(paths, schema) and returns: block_metadata