code: def test_dd_range_errors(self):
      # Test that descriptive exceptions are raised as appropriate for bad
      # values of the `range` argument. (See gh-12996)
      with assert_raises(
          ValueError, match="In range, start must be <= stop"
      ):
          binned_statistic_dd([self.y], self.v, range=[[1, 0]])
      with assert_raises(
          ValueError,
          match="In dimension 1 of range, start must be <= stop",
      ):
          binned_statistic_dd(
              [self.x, self.y], self.v, range=[[1, 0], [0, 1]]
          )
      with assert_raises(
          ValueError,
          match="In dimension 2 of range, start must be <= stop",
      ):
          binned_statistic_dd(
              [self.x, self.y], self.v, range=[[0, 1], [1, 0]]
          )
      with assert_raises(
          ValueError, match="range given for 1 dimensions; 2 required"
      ):
          binned_statistic_dd([self.x, self.y], self.v, range=[[0, 1]])
  
imports: import numpy
  from numpy.testing import assert_allclose
  from pytest import raises
  from scipy.stats import binned_statistic, binned_statistic_2d, binned_statistic_dd
  from scipy._lib._util import check_random_state
  from .common_tests import check_named_results
label_desc: Use image node_id 41 for calling the TestBinnedStatistic obj's underlying member method code with example usage: obj.test_dd_range_errors() without return types