code: def _get_dataset_info(dataset, dataset_id, path):
      total_rows = 0
      total_byte_size = 0
      for piece in dataset.pieces:
          metadata = piece.get_metadata()
          total_rows += metadata.num_rows
          for row_group_index in range(metadata.num_row_groups):
              row_group = metadata.row_group(row_group_index)
              total_byte_size += row_group.total_byte_size
  
      if total_rows == 0:
          raise ValueError(
              "No rows found in {} dataset: {}".format(dataset_id, path)
          )
  
      if total_byte_size == 0:
          raise ValueError(
              "No data found in {} dataset: {}".format(dataset_id, path)
          )
  
      if total_rows > total_byte_size:
          raise ValueError(
              "Found {} bytes in {} rows; {} dataset may be corrupted.".format(
                  total_byte_size, total_rows, dataset_id
              )
          )
  
      return total_rows, total_byte_size
  
imports: import horovod.spark.common._namedtuple_fix
  import contextlib
  import os
  import time
  from multiprocessing.pool import ThreadPool
  import pyarrow
  import numpy
  import pyspark.sql.functions
  from pyspark.ml.linalg import DenseVector, SparseVector, Vector, VectorUDT
  from pyspark.sql.types import ArrayType, BinaryType, BooleanType, FloatType, DoubleType, IntegerType, LongType, NullType, StringType
  from pyspark.sql import SparkSession
  from horovod.runner.common.util import codec, host_hash
  from horovod.spark.common import cache, constants
label_desc: Use image node_id 12 for calling a global function with example usage: _get_dataset_info(dataset, dataset_id, path) and returns: total_rows,  total_byte_size