class_docstr: This function implements 1d convolution.
  
  Arguments
  ---------
  out_channels : int
      It is the number of output channels.
  kernel_size : int
      Kernel size of the convolutional filters.
  input_shape : tuple
      The shape of the input. Alternatively use ``in_channels``.
  in_channels : int
      The number of input channels. Alternatively use ``input_shape``.
  stride : int
      Stride factor of the convolutional filters. When the stride factor > 1,
      a decimation in time is performed.
  dilation : int
      Dilation factor of the convolutional filters.
  padding : str
      (same, valid, causal). If "valid", no padding is performed.
      If "same" and stride is 1, output shape is the same as the input shape.
      "causal" results in causal (dilated) convolutions.
  groups: int
      Number of blocked connections from input channels to output channels.
  padding_mode : str
      This flag specifies the type of padding. See torch.nn documentation
      for more information.
  skip_transpose : bool
      If False, uses batch x time x channel convention of speechbrain.
      If True, uses batch x channel x time convention.
  weight_norm : bool
      If True, use weight normalization,
      to be removed with self.remove_weight_norm() at inference
  conv_init : str
      Weight initialization for the convolution network
  default_padding: str or int
      This sets the default padding mode that will be used by the pytorch Conv1d backend.
  
  Example
  -------
  >>> inp_tensor = torch.rand([10, 40, 16])
  >>> cnn_1d = Conv1d(
  ...     input_shape=inp_tensor.shape, out_channels=8, kernel_size=5
  ... )
  >>> out_tensor = cnn_1d(inp_tensor)
  >>> out_tensor.shape
  torch.Size([10, 40, 8])
docstr: This function performs zero-padding on the time axis
  such that their lengths is unchanged after the convolution.
  
  Arguments
  ---------
  x : torch.Tensor
      Input tensor.
  kernel_size : int
      Size of kernel.
  dilation : int
      Dilation used.
  stride : int
      Stride.
docstr_tok: ["This","function","performs","zero-padding","on","the","time","axis","such","that","their","lengths","is","unchanged","after","the","convolution",".","Arguments","--","--","--","--","-","x",":","torch.Tensor","Input","tensor",".","kernel_size",":","int","Size","of","kernel",".","dilation",":","int","Dilation","used",".","stride",":","int","Stride","."]
code: def _manage_padding(
      self,
      x,
      kernel_size: int,
      dilation: int,
      stride: int,
  ):
      """This function performs zero-padding on the time axis
      such that their lengths is unchanged after the convolution.
  
      Arguments
      ---------
      x : torch.Tensor
          Input tensor.
      kernel_size : int
          Size of kernel.
      dilation : int
          Dilation used.
      stride : int
          Stride.
      """
  
      # Detecting input shape
      L_in = self.in_channels
  
      # Time padding
      padding = get_padding_elem(L_in, stride, kernel_size, dilation)
  
      # Applying padding
      x = F.pad(x, padding, mode=self.padding_mode)
  
      return x
  
imports: import math
  import torch
  import logging
  import numpy
  import torch.nn
  import torch.nn.functional
  import torchaudio
  from typing import Tuple
  from speechbrain.processing.signal_processing import gabor_impulse_response, gabor_impulse_response_legacy_complex
label_desc: Use image node_id 3 for calling the Conv1d obj's underlying member method code with example usage: obj._manage_padding(x, kernel_size, dilation, stride) and returns: x