code: def create_piecewise_constant_decay_with_warmup(
      batch_size,
      epoch_size,
      warmup_epochs,
      boundaries,
      multipliers,
      compute_lr_on_cpu=True,
      name=None,
  ):
      if len(boundaries) != len(multipliers) - 1:
          raise ValueError(
              "The length of boundaries must be 1 less than the "
              "length of multipliers"
          )
      base_lr_batch_size = 256
      steps_per_epoch = epoch_size // batch_size
  
      rescaled_lr = BASE_LEARNING_RATE * batch_size / base_lr_batch_size
      step_boundaries = [float(steps_per_epoch) * x for x in boundaries]
      lr_values = [rescaled_lr * m for m in multipliers]
      if StrictVersion(tf.__version__) >= StrictVersion("2.13"):
          warmup_steps = int(warmup_epochs * steps_per_epoch)
      else:
          warmup_steps = warmup_epochs * steps_per_epoch
      compute_lr_on_cpu = compute_lr_on_cpu
      name = name
      return PiecewiseConstantDecayWithWarmup(
          rescaled_lr,
          step_boundaries,
          lr_values,
          warmup_steps,
          compute_lr_on_cpu,
          name,
      )
  
file_path: DALI/docs/examples/use_cases/tensorflow/resnet-n/nvutils/common.py
imports: import tensorflow
  from distutils.version import StrictVersion
label_desc: Use image node_id 1 for calling a global function with example usage: create_piecewise_constant_decay_with_warmup(batch_size, epoch_size, warmup_epochs, boundaries, multipliers, compute_lr_on_cpu, name) and returns: PiecewiseConstantDecayWithWarmup