code: def nansum(
      values: np.ndarray,
      *,
      axis: AxisInt | None = None,
      skipna: bool = True,
      min_count: int = 0,
      mask: npt.NDArray[np.bool_] | None = None,
  ) -> float:
      """
      Sum the elements along an axis ignoring NaNs
  
      Parameters
      ----------
      values : ndarray[dtype]
      axis : int, optional
      skipna : bool, default True
      min_count: int, default 0
      mask : ndarray[bool], optional
          nan-mask if known
  
      Returns
      -------
      result : dtype
  
      Examples
      --------
      >>> from pandas.core import nanops
      >>> s = pd.Series([1, 2, np.nan])
      >>> nanops.nansum(s.values)
      3.0
      """
      dtype = values.dtype
      values, mask = _get_values(
          values, skipna, fill_value=0, mask=mask
      )
      dtype_sum = _get_dtype_max(dtype)
      if dtype.kind == "f":
          dtype_sum = dtype
      elif dtype.kind == "m":
          dtype_sum = np.dtype(np.float64)
  
      the_sum = values.sum(axis, dtype=dtype_sum)
      the_sum = _maybe_null_out(
          the_sum, axis, mask, values.shape, min_count=min_count
      )
  
      return the_sum
  
imports: from __future__ import annotations
  import functools
  import itertools
  from typing import Any, Callable, cast
  import warnings
  import numpy
  from pandas._config import get_option
  from pandas._libs import NaT, NaTType, iNaT, lib
  from pandas._typing import ArrayLike, AxisInt, CorrelationMethod, Dtype, DtypeObj, F, Scalar, Shape, npt
  from pandas.compat._optional import import_optional_dependency
  from pandas.util._exceptions import find_stack_level
  from pandas.core.dtypes.common import is_complex, is_float, is_float_dtype, is_integer, is_numeric_dtype, is_object_dtype, needs_i8_conversion, pandas_dtype
  from pandas.core.dtypes.missing import isna, na_value_for_dtype, notna
label_desc: Use image node_id 15 for calling a global function with example usage: nansum(values) and returns: the_sum