code: def _circfuncs_common(samples, high, low, nan_policy="propagate"):
      # Ensure samples are array-like and size is not zero
      samples = np.asarray(samples)
      if samples.size == 0:
          return np.nan, np.asarray(np.nan), np.asarray(np.nan), None
  
      # Recast samples as radians that range between 0 and 2 pi and calculate
      # the sine and cosine
      sin_samp = sin((samples - low) * 2.0 * pi / (high - low))
      cos_samp = cos((samples - low) * 2.0 * pi / (high - low))
  
      # Apply the NaN policy
      contains_nan, nan_policy = _contains_nan(samples, nan_policy)
      if contains_nan and nan_policy == "omit":
          mask = np.isnan(samples)
          # Set the sines and cosines that are NaN to zero
          sin_samp[mask] = 0.0
          cos_samp[mask] = 0.0
      else:
          mask = None
  
      return samples, sin_samp, cos_samp, mask
  
imports: from __future__ import annotations
  import math
  import warnings
  from collections import namedtuple
  import numpy
  from numpy import isscalar, r_, log, around, unique, asarray, zeros, arange, sort, amin, amax, atleast_1d, sqrt, array, compress, pi, exp, ravel, count_nonzero, sin, cos, arctan2, hypot
  from scipy import optimize
  from scipy import special
  from .None import statlib
  from .None import stats
  from .stats import find_repeats, _contains_nan, _normtest_finish
  from .contingency import chi2_contingency
  from .None import distributions
  from ._distn_infrastructure import rv_generic
  from ._hypotests import _get_wilcoxon_distr
label_desc: Use image node_id 36 for calling a global function with example usage: _circfuncs_common(samples, high, low, nan_policy) and returns: samples,  sin_samp,  cos_samp,  mask, np,  np,  np,  None