code: def _toeplitz_dot(a, b):
      """Create upper triangular Toeplitz matrices & compute the dot product."""
      # This is equivalent to:
      # a = linalg.toeplitz(a)
      # b = linalg.toeplitz(b)
      # a[np.triu_indices(len(a), 1)] = 0
      # b[np.triu_indices(len(a), 1)] = 0
      # out = np.dot(a.T, b)
      assert a.shape == b.shape and a.ndim == 1
      out = np.outer(a, b)
      for ii in range(1, len(a)):
          out[ii, ii:] += out[ii - 1, ii - 1 : -1]
          out[ii + 1 :, ii] += out[ii:-1, ii - 1]
      return out
  
imports: import numpy
  from scipy import linalg
  from scipy.signal import fftconvolve
  from scipy.sparse.csgraph import laplacian
  from ..cuda import _setup_cuda_fft_multiply_repeated
  from ..filter import next_fast_len
  from ..fixes import jit
  from ..utils import ProgressBar, _check_option, _validate_type, logger, warn
  from .base import BaseEstimator
label_desc: Use image node_id 3 for calling a global function with example usage: _toeplitz_dot(a, b) and returns: out