code: def generalized_outer_product(x):
      if np.ndim(x) == 1:
          return np.outer(x, x)
      return np.matmul(x, np.swapaxes(x, -1, -2))
  
file_path: autograd/autograd/scipy/stats/multivariate_normal.py
imports: from __future__ import absolute_import
  import scipy.stats
  import autograd.numpy
  from autograd.numpy.numpy_vjps import unbroadcast_f
  from autograd.extend import primitive, defvjp
label_desc: Use image node_id 1 for calling a global function with example usage: generalized_outer_product(x) and returns: np, np