code: def test_sklearn_linear_solver(rng):
      class SillySolver(opt.SKLearnLinearSolver):
          def fit(self, X, y):
              self.coef_ = np.ones(X.shape[-1])
  
      MySillySolver = SillySolver()
      n_samples = 100
      n_features = 20
      y = rng.random(n_samples)
      X = np.ones((n_samples, n_features))
      MySillySolver.fit(X, y)
      npt.assert_equal(MySillySolver.coef_, np.ones(n_features))
      npt.assert_equal(
          MySillySolver.predict(X), np.ones(n_samples) * 20
      )
  
file_path: dipy/dipy/core/tests/test_optimize.py
imports: import numpy
  import scipy.sparse
  import numpy.testing
  from dipy.core.optimize import Optimizer, sparse_nnls, spdot
  import dipy.core.optimize
  from dipy.testing.decorators import set_random_number_generator
label_desc: Use image node_id 4 for calling a global function with example usage: test_sklearn_linear_solver(rng) without return types