code: def test_cleanlearning():
      # test fit and predict
      cl = CleanLearning()
      cl.fit(X, y)
      preds = cl.predict(X)
      cl_r2_score = cl.score(X, y)
      manual_r2_score = r2_score(y, preds)
      assert len(preds) == len(y)
      assert isinstance(cl_r2_score, float)
      assert cl_r2_score == manual_r2_score
  
      # check if label issues were identified
      label_issues = cl.get_label_issues()
      identified_label_issues = label_issues[
          label_issues["is_label_issue"] == True
      ].index
      frac_errors_identified = np.mean(
          [e in identified_label_issues for e in error_idx]
      )
      assert (
          frac_errors_identified >= 0.9
      )  # assert most errors were detected
  
      # compare perf to base LinearRegression model
      cl_score = cl.score(X_test, y_test)
      lr = LinearRegression()
      lr.fit(X, y)
      lr_score = lr.score(X_test, y_test)
      assert cl_score > lr_score
  
      # test passing in label issues in various forms
      # also test different regression model
      cl = CleanLearning(model=SVR())
      label_issues = cl.find_label_issues(X, y)
      assert isinstance(label_issues, pd.DataFrame)
  
      cl.fit(X, y, label_issues=label_issues)
      cl.fit(
          X, pd.Series(y), label_issues=label_issues["is_label_issue"]
      )
      cl.fit(
          X, list(y), label_issues=label_issues["is_label_issue"].values
      )
  
imports: import pytest
  import random
  import numpy
  import pandas
  from sklearn.svm import SVR
  from sklearn.metrics import r2_score
  from sklearn.linear_model import LinearRegression
  from cleanlab.regression.rank import get_label_quality_scores, _get_residual_score_for_each_label, _get_outre_score_for_each_label
  from cleanlab.regression.learn import CleanLearning
label_desc: Use image node_id 11 for calling a global function with example usage: test_cleanlearning() without return types