code: def test_some_nan_values(self):
      # gh-7503
      one_nan = np.array([0, 1, np.nan])
      all_nan = np.array([np.nan, np.nan])
  
      # the internal comparisons with NaN give warnings
      #      sup = suppress_warnings()
      #      sup.filter(RuntimeWarning)
      #      with sup:
      # can't infer range with nan
      assert_raises(ValueError, histogram, one_nan, bins="auto")
      assert_raises(ValueError, histogram, all_nan, bins="auto")
  
      # explicit range solves the problem
      h, b = histogram(one_nan, bins="auto", range=(0, 1))
      assert_equal(h.sum(), 2)  # nan is not counted
      h, b = histogram(all_nan, bins="auto", range=(0, 1))
      assert_equal(h.sum(), 0)  # nan is not counted
  
      # as does an explicit set of bins
      h, b = histogram(one_nan, bins=[0, 1])
      assert_equal(h.sum(), 2)  # nan is not counted
      h, b = histogram(all_nan, bins=[0, 1])
      assert_equal(h.sum(), 0)
  
imports: import functools
  from unittest import expectedFailure, skipIf
  from pytest import raises
  from torch.testing._internal.common_utils import instantiate_parametrized_tests, parametrize, run_tests, slowTest, TEST_WITH_TORCHDYNAMO, TestCase, xpassIfTorchDynamo
label_desc: Use image node_id 21 for calling the TestHistogram obj's underlying member method code with example usage: obj.test_some_nan_values() without return types