code: def calculate_variance(X):
      """Return the variance of the features in dataset X"""
      mean = np.ones(np.shape(X)) * X.mean(0)
      n_samples = np.shape(X)[0]
      variance = (1 / n_samples) * np.diag((X - mean).T.dot(X - mean))
  
      return variance
  
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 3 for calling a global function with example usage: calculate_variance(X) and returns: variance