code: def scipy_mahalanobis(x, mean, cov):
      # scipy 1.9 will not accept scalars as input, so force the correct
      # behavior so we don't get deprecation warnings or exceptions
  
      def validate_vector(u):
          u = np.asarray(u).squeeze()
          # Ensure values such as u=1 and u=[1] still return 1-D arrays.
          u = np.atleast_1d(u)
          return u
  
      x = validate_vector(x)
      mean = validate_vector(mean)
      return _scipy_mahalanobis(x, mean, cov)
  
imports: from __future__ import division
  from math import exp
  import warnings
  import matplotlib.pyplot
  from mpl_toolkits.mplot3d import axes3d
  import numpy
  from numpy.linalg import inv
  import scipy
  from scipy.spatial.distance import mahalanobis
  from filterpy.stats import norm_cdf, multivariate_gaussian, logpdf, mahalanobis
  from scipy import linalg
label_desc: Use image node_id 1 for calling a global function with example usage: scipy_mahalanobis(x, mean, cov) and returns: _scipy_mahalanobis, u