code: def test_check_empty_inputs():
      # Test that _check_empty_inputs is doing its job, at least for single-
      # sample inputs. (Multi-sample functionality is tested below.)
      # If the input sample is not empty, it should return None.
      # If the input sample is empty, it should return an array of NaNs or an
      # empty array of appropriate shape. np.mean is used as a reference for the
      # output because, like the statistics calculated by these functions,
      # it works along and "consumes" `axis` but preserves the other axes.
      for i in range(5):
          for combo in combinations_with_replacement([0, 1, 2], i):
              for axis in range(len(combo)):
                  samples = (np.zeros(combo),)
                  output = stats._axis_nan_policy._check_empty_inputs(
                      samples, axis
                  )
                  if output is not None:
                      with np.testing.suppress_warnings() as sup:
                          sup.filter(
                              RuntimeWarning, "Mean of empty slice."
                          )
                          sup.filter(
                              RuntimeWarning,
                              "invalid value encountered",
                          )
                          reference = samples[0].mean(axis=axis)
                      np.testing.assert_equal(output, reference)
  
imports: from itertools import product, combinations_with_replacement, permutations
  import re
  import pickle
  import pytest
  import numpy
  from numpy.testing import assert_allclose, assert_equal, suppress_warnings
  from scipy import stats
  from scipy.stats import norm
  from scipy.stats._axis_nan_policy import _masked_arrays_2_sentinel_arrays
  from scipy._lib._util import AxisError
label_desc: Use image node_id 16 for calling a global function with example usage: test_check_empty_inputs() without return types