code: def covariance_ellipse(P, deviations=1):
      """
      Returns a tuple defining the ellipse representing the 2 dimensional
      covariance matrix P.
  
      Parameters
      ----------
  
      P : nd.array shape (2,2)
         covariance matrix
  
      deviations : int (optional, default = 1)
         # of standard deviations. Default is 1.
  
      Returns (angle_radians, width_radius, height_radius)
      """
  
      U, s, _ = linalg.svd(P)
      orientation = math.atan2(U[1, 0], U[0, 0])
      width = deviations * math.sqrt(s[0])
      height = deviations * math.sqrt(s[1])
  
      if height > width:
          raise ValueError("width must be greater than height")
  
      return (orientation, width, height)
  
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 16 for calling a global function with example usage: covariance_ellipse(P, deviations) and returns: orientation,  width,  height