code: def calculate_covariance_matrix(X, Y=None):
      """Calculate the covariance matrix for the dataset X"""
      if Y is None:
          Y = X
      n_samples = np.shape(X)[0]
      covariance_matrix = (1 / (n_samples - 1)) * (
          X - X.mean(axis=0)
      ).T.dot(Y - Y.mean(axis=0))
  
      return np.array(covariance_matrix, dtype=float)
  
file_path: ML-From-Scratch/mlfromscratch/utils/data_operation.py
imports: from __future__ import division
  import numpy
  import math
  import sys
label_desc: Use image node_id 7 for calling a global function with example usage: calculate_covariance_matrix(X, Y) and returns: np