code: def _main(sys_argv):
      logging.basicConfig()
  
      args = args_parser().parse_args(sys_argv)
  
      # We set spark.sql.files.maxPartitionBytes to a large value since we typically have small number of rows per
      # rowgroup. Reading a parquet store with default settings would result in excessively large number of partitions
      # and inefficient processing
      spark = (
          configure_spark(
              SparkSession.builder.appName("petastorm-copy"), args
          )
          .config("spark.sql.files.maxPartitionBytes", "1010612736")
          .getOrCreate()
      )
  
      copy_dataset(
          spark,
          args.source_url,
          args.target_url,
          args.field_regex,
          args.not_null_fields,
          args.overwrite_output,
          args.partition_count,
          args.row_group_size_mb,
          hdfs_driver=args.hdfs_driver,
      )
  
      spark.stop()
  
file_path: petastorm/petastorm/tools/copy_dataset.py
imports: import argparse
  import logging
  import operator
  import sys
  from functools import reduce
  from pyspark.sql import SparkSession
  from petastorm.unischema import match_unischema_fields
  from petastorm.etl.dataset_metadata import materialize_dataset, get_schema_from_dataset_url
  from petastorm.tools.spark_session_cli import add_configure_spark_arguments, configure_spark
  from petastorm.fs_utils import FilesystemResolver
label_desc: Use image node_id 3 for calling a global function with example usage: _main(sys_argv) without return types