class_docstr: An operator that zips its inputs together.
  
  NOTE: the implementation is bulk for now, which materializes all its inputs in
  object store, before starting execution. Should re-implement it as a streaming
  operator in the future.
class_docstr_tok: ["An","operator","that","zips","its","inputs","together",".","NOTE",":","the","implementation","is","bulk","for","now",",","which","materializes","all","its","inputs","in","object","store",",","before","starting","execution",".","Should","re-implement","it","as","a","streaming","operator","in","the","future","."]
docstr: Calculate the number of rows and size in bytes for a list of blocks with
  metadata.
docstr_tok: ["Calculate","the","number","of","rows","and","size","in","bytes","for","a","list","of","blocks","with","metadata","."]
code: def _calculate_blocks_rows_and_bytes(
      self,
      blocks_with_metadata: BlockPartition,
  ) -> Tuple[List[int], List[int]]:
      """Calculate the number of rows and size in bytes for a list of blocks with
      metadata.
      """
      get_num_rows_and_bytes = cached_remote_fn(_get_num_rows_and_bytes)
      block_rows = []
      block_bytes = []
      for block, metadata in blocks_with_metadata:
          if metadata.num_rows is None or metadata.size_bytes is None:
              # Need to fetch number of rows or size in bytes, so just fetch both.
              num_rows, size_bytes = ray.get(
                  get_num_rows_and_bytes.remote(block)
              )
              # Cache on the block metadata.
              metadata.num_rows = num_rows
              metadata.size_bytes = size_bytes
          block_rows.append(metadata.num_rows)
          block_bytes.append(metadata.size_bytes)
      return block_rows, block_bytes
  
imports: import itertools
  from typing import List, Tuple
  import ray
  from ray.data._internal.delegating_block_builder import DelegatingBlockBuilder
  from ray.data._internal.execution.interfaces import PhysicalOperator, RefBundle
  from ray.data._internal.remote_fn import cached_remote_fn
  from ray.data._internal.split import _split_at_indices
  from ray.data._internal.stats import StatsDict
  from ray.data.block import Block, BlockAccessor, BlockExecStats, BlockMetadata, BlockPartition
label_desc: Use image node_id 9 for calling the ZipOperator obj's underlying member method code with example usage: obj._calculate_blocks_rows_and_bytes(blocks_with_metadata) and returns: block_rows,  block_bytes