code: def test_line_model_nd_residuals():
      model = LineModelND()
      model.params = (np.array([0, 0, 0]), np.array([0, 0, 1]))
      assert_equal(abs(model.residuals(np.array([[0, 0, 0]]))), 0)
      assert_equal(abs(model.residuals(np.array([[0, 0, 1]]))), 0)
      assert_equal(abs(model.residuals(np.array([[10, 0, 0]]))), 10)
      # test params argument in model.rediduals
      data = np.array([[10, 0, 0]])
      params = (np.array([0, 0, 0]), np.array([2, 0, 0]))
      assert_equal(abs(model.residuals(data, params=params)), 30)
  
imports: import numpy
  import pytest
  from skimage._shared import testing
  from skimage._shared._warnings import expected_warnings
  from skimage._shared.testing import arch32, assert_almost_equal, assert_array_less, assert_equal, xfail
  from skimage.measure import CircleModel, EllipseModel, LineModelND, ransac
  from skimage.measure.fit import _dynamic_max_trials
  from skimage.transform import AffineTransform
label_desc: Use image node_id 5 for calling a global function with example usage: test_line_model_nd_residuals() without return types