code: def get_pipeline(
      batch_size=4,
      in_size=None,
      out_size=None,
      even_paste_count=False,
      k=4,
      dtype=types.UINT8,
      no_intersections=True,
      full_input=False,
      in_anchor_top_left=False,
      in_anchor_range=None,
      out_anchor_top_left=False,
      out_anchor_range=None,
      use_gpu=False,
      num_out_of_bounds=0,
  ):
      pipe = Pipeline(
          batch_size=batch_size,
          num_threads=4,
          device_id=0,
          seed=np.random.randint(12345),
      )
      with pipe:
          input, _ = fn.readers.file(file_root=img_dir)
          decoded = fn.decoders.image(
              input, device="cpu", output_type=types.RGB
          )
          resized = fn.resize(
              decoded, resize_x=in_size[1], resize_y=in_size[0]
          )
          (
              in_idx_l,
              in_anchors_l,
              shapes_l,
              out_anchors_l,
          ) = prepare_cuts(
              k,
              batch_size,
              in_size,
              out_size,
              even_paste_count,
              no_intersections,
              full_input,
              in_anchor_top_left,
              in_anchor_range,
              out_anchor_top_left,
              out_anchor_range,
              num_out_of_bounds,
          )
          in_idx = fn.external_source(lambda: in_idx_l)
          in_anchors = fn.external_source(lambda: in_anchors_l)
          shapes = fn.external_source(lambda: shapes_l)
          out_anchors = fn.external_source(lambda: out_anchors_l)
          kwargs = {
              "in_ids": in_idx,
              "output_size": out_size,
              "dtype": dtype,
          }
  
          if not full_input:
              kwargs["shapes"] = shapes
  
          if not in_anchor_top_left:
              kwargs["in_anchors"] = in_anchors
  
          if not out_anchor_top_left:
              kwargs["out_anchors"] = out_anchors
  
          pasted = fn.multi_paste(
              resized.gpu() if use_gpu else resized, **kwargs
          )
          pipe.set_outputs(pasted, resized)
      return pipe, in_idx_l, in_anchors_l, shapes_l, out_anchors_l
  
file_path: DALI/dali/test/python/operator_1/test_multipaste.py
imports: from nvidia.dali.pipeline import Pipeline
  import nvidia.dali.fn
  import nvidia.dali.types
  import numpy
  import os
  from test_utils import get_dali_extra_path
label_desc: Use image node_id 3 for calling a global function with example usage: get_pipeline(batch_size, in_size, out_size, even_paste_count, k, dtype, no_intersections, full_input, in_anchor_top_left, in_anchor_range, out_anchor_top_left, out_anchor_range, use_gpu, num_out_of_bounds) and returns: pipe,  in_idx_l,  in_anchors_l,  shapes_l,  out_anchors_l