class_docstr: Audio segment abstraction.
  :param samples: Audio samples [num_samples x num_channels].
  :type samples: ndarray.float32
  :param sample_rate: Audio sample rate.
  :type sample_rate: int
  :raises TypeError: If the sample data type is not float or int.
docstr: Add zero padding to the sample. The pad size is given in number
  of samples.
  If symmetric=True, `pad_size` will be added to both sides. If false,
  `pad_size`
  zeros will be added only to the end.
docstr_tok: ["Add","zero","padding","to","the","sample",".","The","pad","size","is","given","in","number","of","samples",".","If","symmetric=True",",","`","pad_size","`","will","be","added","to","both","sides",".","If","false",",","`","pad_size","`","zeros","will","be","added","only","to","the","end","."]
code: def pad(self, pad_size, symmetric=False):
      """Add zero padding to the sample. The pad size is given in number
      of samples.
      If symmetric=True, `pad_size` will be added to both sides. If false,
      `pad_size`
      zeros will be added only to the end.
      """
      samples_ndim = self._samples.ndim
      if samples_ndim == 1:
          pad_width = pad_size if symmetric else (0, pad_size)
      elif samples_ndim == 2:
          # pad samples, keep channels
          pad_width = (
              ((pad_size, pad_size), (0, 0))
              if symmetric
              else ((0, pad_size), (0, 0))
          )
      else:
          raise NotImplementedError(
              f"Padding not implemented for signals with more that 2 dimensions. Current samples dimension: {samples_ndim}."
          )
      # apply padding
      self._samples = np.pad(
          self._samples,
          pad_width,
          mode="constant",
      )
  
imports: import math
  import os
  import random
  from typing import Optional
  import librosa
  import numpy
  import soundfile
  from nemo.collections.asr.parts.utils.audio_utils import select_channels
  from nemo.utils import logging
label_desc: Use image node_id 18 for calling the AudioSegment obj's underlying member method code with example usage: obj.pad(pad_size, symmetric) without return types