code: def nansum(values, axis=None, skipna=True, min_count=0, mask=None):
      """
      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
      --------
      >>> import pandas.core.nanops as nanops
      >>> s = pd.Series([1, 2, np.nan])
      >>> nanops.nansum(s)
      3.0
      """
      values, mask, dtype, dtype_max, _ = _get_values(
          values, skipna, 0, mask=mask
      )
      dtype_sum = dtype_max
      if is_float_dtype(dtype):
          dtype_sum = dtype
      elif is_timedelta64_dtype(dtype):
          dtype_sum = np.float64
      the_sum = values.sum(axis, dtype=dtype_sum)
      the_sum = _maybe_null_out(
          the_sum, axis, mask, min_count=min_count
      )
  
      return _wrap_results(the_sum, dtype)
  
imports: from distutils.version import LooseVersion
  import functools
  import itertools
  import operator
  import warnings
  import numpy
  from pandas._libs import iNaT, lib, tslibs
  import pandas.compat
  from pandas.core.dtypes.cast import _int64_max, maybe_upcast_putmask
  from pandas.core.dtypes.common import _get_dtype, is_any_int_dtype, is_bool_dtype, is_complex, is_complex_dtype, is_datetime64_dtype, is_datetime64tz_dtype, is_datetime_or_timedelta_dtype, is_float, is_float_dtype, is_integer, is_integer_dtype, is_numeric_dtype, is_object_dtype, is_scalar, is_timedelta64_dtype, pandas_dtype
  from pandas.core.dtypes.dtypes import DatetimeTZDtype
  from pandas.core.dtypes.missing import isna, na_value_for_dtype, notna
  import pandas.core.common
  from pandas.core.config import get_option
label_desc: Use image node_id 12 for calling a global function with example usage: nansum(values, axis, skipna, min_count, mask) and returns: _wrap_results