code: def test_is_in_range(interval):
      # make sure low and high are always within the interval, used for linspace
      low, high = _inclusive_low_high(interval)
  
      x = np.linspace(low, high, num=10)
      assert interval.includes(x)
  
      # x contains lower bound
      assert (
          interval.includes(np.r_[x, interval.low])
          == interval.low_inclusive
      )
  
      # x contains upper bound
      assert (
          interval.includes(np.r_[x, interval.high])
          == interval.high_inclusive
      )
  
      # x contains upper and lower bound
      assert interval.includes(
          np.r_[x, interval.low, interval.high]
      ) == (interval.low_inclusive and interval.high_inclusive)
  
file_path: scikit-learn/sklearn/_loss/tests/test_link.py
imports: import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_equal
  from sklearn._loss.link import _LINKS, HalfLogitLink, Interval, MultinomialLogit, _inclusive_low_high
label_desc: Use image node_id 2 for calling a global function with example usage: test_is_in_range(interval) without return types