code: def rankreduce(array, rankbound):
      """Project 2D array on top rankbound singular values."""
      arraysvd = svds(array.astype("f"), k=rankbound)
      return np.dot(arraysvd[0], np.diag(arraysvd[1]))
  
imports: import collections
  from functools import partial
  import numpy
  from scipy.sparse.linalg import svds
  from sklearn.base import BaseEstimator, TransformerMixin
  from sktime.dists_kernels.base import BasePairwiseTransformerPanel
label_desc: Use image node_id 8 for calling a global function with example usage: rankreduce(array, rankbound) and returns: np