code: def logpdf(x, mean=None, cov=1, allow_singular=True):
      """
      Computes the log of the probability density function of the normal
      N(mean, cov) for the data x. The normal may be univariate or multivariate.
  
      Wrapper for older versions of scipy.multivariate_normal.logpdf which
      don't support support the allow_singular keyword prior to verion 0.15.0.
  
      If it is not supported, and cov is singular or not PSD you may get
      an exception.
  
      `x` and `mean` may be column vectors, row vectors, or lists.
      """
  
      if mean is not None:
          flat_mean = np.asarray(mean).flatten()
      else:
          flat_mean = None
  
      flat_x = np.asarray(x).flatten()
  
      if _support_singular:
          return multivariate_normal.logpdf(
              flat_x, flat_mean, cov, allow_singular
          )
      return multivariate_normal.logpdf(flat_x, flat_mean, cov)
  
imports: from __future__ import absolute_import, division, unicode_literals
  import math
  from math import cos, sin
  import random
  import warnings
  import numpy
  from numpy.linalg import inv
  import scipy.linalg
  import scipy.sparse
  import scipy.sparse.linalg
  from scipy.stats import norm, multivariate_normal
label_desc: Use image node_id 5 for calling a global function with example usage: logpdf(x, mean, cov, allow_singular) and returns: multivariate_normal, multivariate_normal