code: def var(
      x: np.ndarray,
      /,
      *,
      axis: Optional[Union[int, Sequence[int]]] = None,
      correction: Union[int, float] = 0.0,
      keepdims: bool = False,
      out: Optional[np.ndarray] = None,
  ) -> np.ndarray:
      if axis is None:
          axis = tuple(range(len(x.shape)))
      axis = (axis,) if isinstance(axis, int) else tuple(axis)
      if isinstance(correction, int):
          return ivy.astype(
              np.var(
                  x,
                  axis=axis,
                  ddof=correction,
                  keepdims=keepdims,
                  out=out,
              ),
              x.dtype,
              copy=False,
          )
      if x.size == 0:
          return np.asarray(float("nan"))
      size = 1
      for a in axis:
          size *= x.shape[a]
      return ivy.astype(
          np.multiply(
              np.var(x, axis=axis, keepdims=keepdims, out=out),
              ivy.stable_divide(size, (size - correction)),
          ),
          x.dtype,
          copy=False,
      )
  
file_path: ivy/ivy/functional/backends/numpy/statistical.py
imports: import numpy
  from typing import Union, Optional, Sequence
  import ivy
  from ivy.func_wrapper import with_unsupported_dtypes
  from ivy.functional.backends.numpy.helpers import _scalar_output_to_0d_array
  from .None import backend_version
  from ivy.utils.einsum_parser import legalise_einsum_expr
label_desc: Use image node_id 8 for calling a global function with example usage: var() and returns: ivy, ivy, np