code: def circmean(
      samples, high=2 * pi, low=0, axis=None, nan_policy="propagate"
  ):
      """Compute the circular mean for samples in a range.
  
      Parameters
      ----------
      samples : array_like
          Input array.
      high : float or int, optional
          High boundary for circular mean range.  Default is ``2*pi``.
      low : float or int, optional
          Low boundary for circular mean range.  Default is 0.
      axis : int, optional
          Axis along which means are computed.  The default is to compute
          the mean of the flattened array.
      nan_policy : {'propagate', 'raise', 'omit'}, optional
          Defines how to handle when input contains nan. 'propagate' returns nan,
          'raise' throws an error, 'omit' performs the calculations ignoring nan
          values. Default is 'propagate'.
  
      Returns
      -------
      circmean : float
          Circular mean.
  
      Examples
      --------
      >>> from scipy.stats import circmean
      >>> circmean([0.1, 2*np.pi+0.2, 6*np.pi+0.3])
      0.2
  
      >>> from scipy.stats import circmean
      >>> circmean([0.2, 1.4, 2.6], high = 1, low = 0)
      0.4
  
      """
      samples, sin_samp, cos_samp, nmask = _circfuncs_common(
          samples, high, low, nan_policy=nan_policy
      )
      sin_sum = sin_samp.sum(axis=axis)
      cos_sum = cos_samp.sum(axis=axis)
      res = arctan2(sin_sum, cos_sum)
  
      mask_nan = ~np.isnan(res)
      if mask_nan.ndim > 0:
          mask = res[mask_nan] < 0
      else:
          mask = res < 0
  
      if mask.ndim > 0:
          mask_nan[mask_nan] = mask
          res[mask_nan] += 2 * pi
      elif mask:
          res += 2 * pi
  
      # Set output to NaN if no samples went into the mean
      if nmask is not None:
          if nmask.all():
              res = np.full(shape=res.shape, fill_value=np.nan)
          else:
              # Find out if any of the axis that are being averaged consist
              # entirely of NaN.  If one exists, set the result (res) to NaN
              nshape = 0 if axis is None else axis
              smask = nmask.shape[nshape] == nmask.sum(axis=axis)
              if smask.any():
                  res[smask] = np.nan
  
      return res * (high - low) / 2.0 / pi + low
  
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 37 for calling a global function with example usage: circmean(samples, high, low, axis, nan_policy) and returns: unknown