code: def nanskew(values, axis=None, skipna=True, mask=None):
      """Compute the sample skewness.
  
      The statistic computed here is the adjusted Fisher-Pearson standardized
      moment coefficient G1. The algorithm computes this coefficient directly
      from the second and third central moment.
  
      Parameters
      ----------
      values : ndarray
      axis: int, optional
      skipna : bool, default True
      mask : ndarray[bool], optional
          nan-mask if known
  
      Returns
      -------
      result : float64
          Unless input is a float array, in which case use the same
          precision as the input array.
  
      Examples
      --------
      >>> import pandas.core.nanops as nanops
      >>> s = pd.Series([1,np.nan, 1, 2])
      >>> nanops.nanskew(s)
      1.7320508075688787
      """
      values = com.values_from_object(values)
      if mask is None:
          mask = isna(values)
      if not is_float_dtype(values.dtype):
          values = values.astype("f8")
          count = _get_counts(mask, axis)
      else:
          count = _get_counts(mask, axis, dtype=values.dtype)
  
      if skipna:
          values = values.copy()
          np.putmask(values, mask, 0)
  
      mean = values.sum(axis, dtype=np.float64) / count
      if axis is not None:
          mean = np.expand_dims(mean, axis)
  
      adjusted = values - mean
      if skipna:
          np.putmask(adjusted, mask, 0)
      adjusted2 = adjusted**2
      adjusted3 = adjusted2 * adjusted
      m2 = adjusted2.sum(axis, dtype=np.float64)
      m3 = adjusted3.sum(axis, dtype=np.float64)
  
      # floating point error
      #
      # #18044 in _libs/windows.pyx calc_skew follow this behavior
      # to fix the fperr to treat m2 <1e-14 as zero
      m2 = _zero_out_fperr(m2)
      m3 = _zero_out_fperr(m3)
  
      with np.errstate(invalid="ignore", divide="ignore"):
          result = (count * (count - 1) ** 0.5 / (count - 2)) * (
              m3 / m2**1.5
          )
  
      dtype = values.dtype
      if is_float_dtype(dtype):
          result = result.astype(dtype)
  
      if isinstance(result, np.ndarray):
          result = np.where(m2 == 0, 0, result)
          result[count < 3] = np.nan
          return result
      else:
          result = 0 if m2 == 0 else result
          if count < 3:
              return np.nan
          return result
  
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 22 for calling a global function with example usage: nanskew(values, axis, skipna, mask) and returns: result, result, np