code: def test_optional_inputs():
      # test with sample_weight input
      cl = CleanLearning(verbose=1)
      cl.fit(X, y, sample_weight=np.random.random(size=len(y)))
      cl.fit(
          X,
          y,
          label_issues=cl.get_label_issues(),
          sample_weight=np.random.random(size=len(y)),
      )
  
      # test with uncertainty input
      cl = CleanLearning()
      cl.find_label_issues(X, y, uncertainty=5)  # constant uncertainty
      cl.find_label_issues(
          X, y, uncertainty=np.random.random(size=len(y))
      )  # per-example uncertainty
  
      # test with not calculating uncertainty
      cl = CleanLearning(n_boot=0, include_aleatoric_uncertainty=False)
      cl.find_label_issues(X, y)
  
      # test with odd grid search sizes
      cl = CleanLearning()
      cl.find_label_issues(X, y, coarse_search_range=[0.2])
      cl.find_label_issues(X, y, fine_search_size=0)
      cl.fit(
          X,
          y,
          find_label_issues_kwargs={
              "coarse_search_range": [0.2, 0.1],
              "fine_search_size": 2,
          },
      )
  
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 12 for calling a global function with example usage: test_optional_inputs() without return types