class_docstr: Resource Efficient Separation Pipeline Used for RE-SepFormer and SkiM
  
  Note: This implementation is a generalization of the ESPNET implementation of SkiM
  
  Arguments:
  ----------
  input_size: int,
      Dimension of the input feature.
      Input shape shoud be (batch, length, input_size)
  hidden_size: int,
      Dimension of the hidden state.
  output_size: int,
      Dimension of the output size.
  dropout: float,
      Dropout ratio. Default is 0.
  num_blocks: int
      Number of basic SkiM blocks
  segment_size: int
      Segmentation size for splitting long features
  bidirectional: bool,
      Whether the RNN layers are bidirectional.
  mem_type: 'hc', 'h', 'c', 'id' or None.
      This controls whether the hidden (or cell) state of SegLSTM
      will be processed by MemLSTM.
      In 'id' mode, both the hidden and cell states will
      be identically returned.
      When mem_type is None, the MemLSTM will be removed.
  norm_type: gln, cln.
      cln is for causal implementation.
  seg_model: class
      The model that processes the within segment elements
  mem_model: class
      The memory model that ensures continuity between the segments
  
  Example
  ---------
  >>> x = torch.randn(10, 100, 64)
  >>> seg_mdl = SBTransformerBlock_wnormandskip(1, 64, 8)
  >>> mem_mdl = SBTransformerBlock_wnormandskip(1, 64, 8)
  >>> resepf_pipeline = ResourceEfficientSeparationPipeline(64, 64, 128, seg_model=seg_mdl, mem_model=mem_mdl)
  >>> out = resepf_pipeline.forward(x)
  >>> out.shape
  torch.Size([10, 100, 128])
docstr: Argument:
  ----------
  input : torch.Tensor of size [B, T, D]
              where B is Batchsize
                    T is the chunk length
                    D is the feature dimensionality
docstr_tok: ["Argument",":","--","--","--","--","--","input",":","torch.Tensor","of","size","[","B",",","T",",","D","]","where","B","is","Batchsize","T","is","the","chunk","length","D","is","the","feature","dimensionality"]
code: def _padfeature(self, input):
      """
      Argument:
      ----------
      input : torch.Tensor of size [B, T, D]
                  where B is Batchsize
                        T is the chunk length
                        D is the feature dimensionality
      """
      B, T, D = input.shape
      rest = self.segment_size - T % self.segment_size
  
      if rest > 0:
          input = torch.nn.functional.pad(input, (0, 0, 0, rest))
      return input, rest
  
imports: import torch
  import torch.nn
  from speechbrain.lobes.models.dual_path import select_norm
  from speechbrain.lobes.models.transformer.Transformer import TransformerEncoder, PositionalEncoding, get_lookahead_mask
  import speechbrain.nnet.RNN
  import copy
label_desc: Use image node_id 3 for calling the ResourceEfficientSeparationPipeline obj's underlying member method code with example usage: obj._padfeature(input) and returns: input,  rest