class_docstr: Pairwise panel transformer that always returns a constant value.
  
  Parameters
  ----------
  constant : float, optional, default = 0
      the constant value that this transformer returns
docstr: Compute distance/kernel matrix.
  
  private _transform containing core logic, called from public transform
  
  Parameters
  ----------
  X: sktime Panel data container
  X2: sktime Panel data container
  
  Returns
  -------
  distmat: np.array of shape [n, m]
      (i,j)-th entry contains distance/kernel between X.iloc[i] and X2.iloc[j]
docstr_tok: ["Compute","distance\/kernel","matrix",".","private","_transform","containing","core","logic",",","called","from","public","transform","Parameters","--","--","--","--","--","X",":","sktime","Panel","data","container","X2",":","sktime","Panel","data","container","Returns","--","--","--","-","distmat",":","np.array","of","shape","[","n",",","m","]","(","i",",","j",")","-th","entry","contains","distance\/kernel","between","X.iloc","[","i","]","and","X2.iloc","[","j","]"]
code: def _transform(self, X, X2=None):
      """Compute distance/kernel matrix.
  
      private _transform containing core logic, called from public transform
  
      Parameters
      ----------
      X: sktime Panel data container
      X2: sktime Panel data container
  
      Returns
      -------
      distmat: np.array of shape [n, m]
          (i,j)-th entry contains distance/kernel between X.iloc[i] and X2.iloc[j]
      """
      # get metadata from self - this is not always len(X) etc
      #   but for the mtypes allowed, it is
      # todo: conversion is wasteful, replace this perhaps by base class functionality
      #   we check the input type anyway, so we could store n_instances
      #   (but the problem there is, we should not write to self in transform)
      n = len(X)
      if X2 is not None:
          m = len(X2)
      else:
          m = n
  
      distmat = self.constant * np.ones((n, m))
  
      return distmat
  
imports: import numpy
  from sktime.dists_kernels.base import BasePairwiseTransformerPanel
label_desc: Use image node_id 2 for calling the ConstantPwTrafoPanel obj's underlying member method code with example usage: obj._transform(X, X2) and returns: distmat