code: def check_args(args):
      if args.prefix is None:
          if (
              args.num_replicas > 1
              or args.include_original_data == "true"
          ):
              args.prefix = "rvb"
              warnings.warn(
                  "--prefix is set to 'rvb' as more than one copy of data is generated"
              )
  
      if not args.num_replicas > 0:
          raise Exception("--num-replications cannot be non-positive")
  
      if (
          args.speech_rvb_probability < 0
          or args.speech_rvb_probability > 1
      ):
          raise Exception(
              "--speech-rvb-probability must be between 0 and 1"
          )
  
      if (
          args.pointsource_noise_addition_probability < 0
          or args.pointsource_noise_addition_probability > 1
      ):
          raise Exception(
              "--pointsource-noise-addition-probability must be between 0 and 1"
          )
  
      if (
          args.isotropic_noise_addition_probability < 0
          or args.isotropic_noise_addition_probability > 1
      ):
          raise Exception(
              "--isotropic-noise-addition-probability must be between 0 and 1"
          )
  
      if args.rir_smoothing_weight < 0 or args.rir_smoothing_weight > 1:
          raise Exception(
              "--rir-smoothing-weight must be between 0 and 1"
          )
  
      if (
          args.noise_smoothing_weight < 0
          or args.noise_smoothing_weight > 1
      ):
          raise Exception(
              "--noise-smoothing-weight must be between 0 and 1"
          )
  
      if args.max_noises_per_minute < 0:
          raise Exception("--max-noises-per-minute cannot be negative")
  
      if (
          args.source_sampling_rate is not None
          and args.source_sampling_rate <= 0
      ):
          raise Exception(
              "--source-sampling-rate cannot be non-positive"
          )
  
      return args
  
imports: import argparse, shlex, glob, math, os, random, sys, warnings, copy, imp, ast
label_desc: Use image node_id 2 for calling a global function with example usage: check_args(args) and returns: args