class_docstr: Applies the lead-lag transformation to each path.
  
  We take the lead of an input stream, and augment it with the lag of the
  input stream. This enables us to capture the quadratic variation of the
  stream and is particularly useful for applications in finance.
  
  Used widely in signature literature, see for example:
      - https://arxiv.org/pdf/1603.03788.pdf
      - https://arxiv.org/pdf/1310.4054.pdf
      - https://arxiv.org/pdf/1307.7244.pdf
class_docstr_tok: ["Applies","the","lead-lag","transformation","to","each","path",".","We","take","the","lead","of","an","input","stream",",","and","augment","it","with","the","lag","of","the","input","stream",".","This","enables","us","to","capture","the","quadratic","variation","of","the","stream","and","is","particularly","useful","for","applications","in","finance",".","Used","widely","in","signature","literature",",","see","for","example",":","-","https",":","\/\/arxiv.org\/pdf\/1603.03788.pdf","-","https",":","\/\/arxiv.org\/pdf\/1310.4054.pdf","-","https",":","\/\/arxiv.org\/pdf\/1307.7244.pdf"]
code: def _transform(self, X, y=None):
      X = np.swapaxes(X, 1, 2)
  
      # Interleave
      X_repeat = X.repeat(2, axis=1)
  
      # Split out lead and lag
      lead = X_repeat[:, 1:, :]
      lag = X_repeat[:, :-1, :]
  
      # Combine
      X_leadlag = np.concatenate((lead, lag), 2)
  
      Xt = np.swapaxes(X_leadlag, 1, 2)
      return Xt
  
imports: import numpy
  from sklearn.pipeline import Pipeline
  from sktime.transformations.base import BaseTransformer
label_desc: Use image node_id 1 for calling the _LeadLag obj's underlying member method code with example usage: obj._transform(X, y) and returns: Xt