code: def test_image_sample(self):
      image = Image(self.array1)
      self.assertEqual(
          image.sample(y=0.25),
          Curve(
              np.array([(-0.333333, 0), (0, 1), (0.333333, 2)]),
              kdims=["x"],
              vdims=["z"],
          ),
      )
  
file_path: holoviews/holoviews/tests/element/test_image.py
imports: import numpy
  import holoviews
  from holoviews.element import Curve, Image
  from ..utils import LoggingComparisonTestCase
label_desc: Use image node_id 4 for calling the TestImage obj's underlying member method code with example usage: obj.test_image_sample() without return types