code: def _merge_impl(
      args: Args,
      M: int,
      pinfo: PartInfo,
      get_block: Callable[[int, int], np.ndarray],
      skip_output=False,
  ):
      merge_fn = (
          _dummy_merge
          if args.skip_sorting
          else sortlib.merge_partitions
      )
      merger = merge_fn(M, get_block)
  
      if skip_output:
          for datachunk in merger:
              del datachunk
      else:
          with open(pinfo.path, "wb") as fout:
              for datachunk in merger:
                  fout.write(datachunk)
      return pinfo
  
imports: import argparse
  import contextlib
  import csv
  import logging
  import os
  import random
  import subprocess
  import tempfile
  from typing import Callable, Dict, Iterable, List
  import numpy
  import ray
  from ray.experimental.raysort import constants, logging_utils, sortlib, tracing_utils
  from ray.experimental.raysort.types import BlockInfo, ByteCount, PartId, PartInfo, Path, RecordCount
  from ray.util.scheduling_strategies import PlacementGroupSchedulingStrategy
label_desc: Use image node_id 12 for calling a global function with example usage: _merge_impl(args, M, pinfo, get_block, skip_output) and returns: pinfo