code: def compute_stats(self, embedding):
      C = embedding.shape[1]
      embedding = embedding.transpose((0, 2, 3, 1)).reshape((-1, C))
      print("Creating CoreSet Sampler via k-Center Greedy")
      sampler = KCenterGreedy(embedding, sampling_ratio=self.k / 100)
      print("Getting the coreset from the main embedding.")
      coreset = sampler.sample_coreset()
      print(
          f"Assigning the coreset as the memory bank with shape {coreset.shape}."
      )  # 18032,384
      self.memory_bank = coreset
  
imports: import numpy
  from tqdm import tqdm
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddle.vision.models.resnet import resnet18, resnet50, wide_resnet50_2
  from scipy.ndimage import gaussian_filter
  from qinspector.cvlib.workspace import register
  from qinspector.uad.utils.utils import cdist, cholesky_inverse, mahalanobis, mahalanobis_einsum, orthogonal, svd_orthogonal
  from qinspector.uad.utils.k_center_greedy import KCenterGreedy
label_desc: Use image node_id 6 for calling the PatchCore obj's underlying member method code with example usage: obj.compute_stats(embedding) without return types