code: def _calc_binned_statistic(
      Vdim, bin_numbers, result, values, stat_func, is_callable=False
  ):
      unique_bin_numbers = np.unique(bin_numbers)
      for vv in builtins.range(Vdim):
          bin_map = _create_binned_data(
              bin_numbers, unique_bin_numbers, values, vv
          )
          for i in unique_bin_numbers:
              # if the stat_func is callable, all results should be updated
              # if the stat_func is np.std, calc std only when binned data is 2
              # or more for speed up.
              if is_callable or not (
                  stat_func is np.std and len(bin_map[i]) < 2
              ):
                  result[vv, i] = stat_func(np.array(bin_map[i]))
  
file_path: catboost/contrib/python/scipy/py3/scipy/stats/_binned_statistic.py
imports: import builtins
  import numpy
  from numpy.testing import suppress_warnings
  from operator import index
  from collections import namedtuple
label_desc: Use image node_id 4 for calling a global function with example usage: _calc_binned_statistic(Vdim, bin_numbers, result, values, stat_func, is_callable) without return types