code: def _cov(data):
      if data.ndim == 1:
          return _cov_1d(data)
      elif data.ndim == 2:
          x = data.astype(float)
          avg, _ = np.average(x, axis=1, weights=None, returned=True)
          ddof = x.shape[1] - 1
          if ddof <= 0:
              warnings.warn(
                  "Degrees of freedom <= 0 for slice",
                  RuntimeWarning,
                  stacklevel=2,
              )
              ddof = 0.0
          x -= avg[:, None]
          prod = _dot(x, x.T.conj())
          prod *= np.true_divide(1, ddof)
          prod = prod.squeeze()
          prod += 1e-6 * np.eye(prod.shape[0])
          return prod
      else:
          raise ValueError(
              f"{data.ndim} dimension arrays are not supported"
          )
  
imports: import functools
  import importlib
  import importlib.resources
  import re
  import warnings
  from functools import lru_cache
  import matplotlib.pyplot
  import numpy
  from numpy import newaxis
  from .rcparams import rcParams
label_desc: Use image node_id 15 for calling a global function with example usage: _cov(data) and returns: _cov_1d, prod