code: def test_aux_inputs():
      data = DATA
      K = len(np.unique(data["labels"]))
      confident_joint = np.ones(shape=(K, K))
      np.fill_diagonal(confident_joint, 10)
      find_label_issues_kwargs = {
          "confident_joint": confident_joint,
          "min_examples_per_class": 2,
      }
      cl = CleanLearning(
          clf=LogisticRegression(
              multi_class="auto", solver="lbfgs", random_state=SEED
          ),
          find_label_issues_kwargs=find_label_issues_kwargs,
          verbose=1,
      )
      label_issues_df = cl.find_label_issues(
          data["X_train"], data["labels"], clf_kwargs={}
      )
      assert isinstance(label_issues_df, pd.DataFrame)
      FIND_OUTPUT_COLUMNS = [
          "is_label_issue",
          "label_quality",
          "given_label",
          "predicted_label",
      ]
      assert list(label_issues_df.columns) == FIND_OUTPUT_COLUMNS
      assert label_issues_df.equals(cl.get_label_issues())
      cl.fit(
          data["X_train"],
          data["labels"],
          label_issues=label_issues_df,
          clf_kwargs={},
          clf_final_kwargs={},
      )
      label_issues_df = cl.get_label_issues()
      assert isinstance(label_issues_df, pd.DataFrame)
      assert list(label_issues_df.columns) == (
          FIND_OUTPUT_COLUMNS + ["sample_weight"]
      )
      score = cl.score(data["X_test"], data["true_labels_test"])
  
      # Test a second fit
      cl.fit(data["X_train"], data["labels"])
  
      # Test cl.find_label_issues with pred_prob input
      pred_probs_test = cl.predict_proba(data["X_test"])
      label_issues_df = cl.find_label_issues(
          X=None,
          labels=data["true_labels_test"],
          pred_probs=pred_probs_test,
      )
      assert isinstance(label_issues_df, pd.DataFrame)
      assert list(label_issues_df.columns) == FIND_OUTPUT_COLUMNS
      assert label_issues_df.equals(cl.get_label_issues())
      cl.save_space()
      assert cl.label_issues_df is None
  
      # Verbose off
      cl = CleanLearning(
          clf=LogisticRegression(
              multi_class="auto", solver="lbfgs", random_state=SEED
          ),
          verbose=0,
      )
      cl.save_space()  # dummy call test
  
      cl = CleanLearning(
          clf=LogisticRegression(
              multi_class="auto", solver="lbfgs", random_state=SEED
          ),
          verbose=0,
      )
      cl.find_label_issues(
          labels=data["true_labels_test"],
          pred_probs=pred_probs_test,
          save_space=True,
      )
  
      cl = CleanLearning(
          clf=LogisticRegression(
              multi_class="auto", solver="lbfgs", random_state=SEED
          ),
          verbose=1,
      )
  
      # Test with label_issues_mask input
      label_issues_mask = find_label_issues(
          labels=data["true_labels_test"],
          pred_probs=pred_probs_test,
      )
      cl.fit(
          data["X_test"],
          data["true_labels_test"],
          label_issues=label_issues_mask,
      )
      label_issues_df = cl.get_label_issues()
      assert isinstance(label_issues_df, pd.DataFrame)
      assert set(label_issues_df.columns).issubset(FIND_OUTPUT_COLUMNS)
  
      # Test with label_issues_indices input
      label_issues_indices = find_label_issues(
          labels=data["true_labels_test"],
          pred_probs=pred_probs_test,
          return_indices_ranked_by="confidence_weighted_entropy",
      )
      cl.fit(
          data["X_test"],
          data["true_labels_test"],
          label_issues=label_issues_indices,
      )
      label_issues_df2 = cl.get_label_issues().copy()
      assert isinstance(label_issues_df2, pd.DataFrame)
      assert set(label_issues_df2.columns).issubset(FIND_OUTPUT_COLUMNS)
      assert label_issues_df2["is_label_issue"].equals(
          label_issues_df["is_label_issue"]
      )
  
      # Test fit() with pred_prob input:
      cl.fit(
          data["X_test"],
          data["true_labels_test"],
          pred_probs=pred_probs_test,
          label_issues=label_issues_mask,
      )
      label_issues_df = cl.get_label_issues()
      assert isinstance(label_issues_df, pd.DataFrame)
      assert set(label_issues_df.columns).issubset(FIND_OUTPUT_COLUMNS)
      assert "label_quality" in label_issues_df.columns
  
      # Test with sample_weight input:
      cl = CleanLearning(
          clf=LogisticRegression(
              multi_class="auto", solver="lbfgs", random_state=SEED
          ),
          verbose=1,
      )
      cl.fit(
          data["X_test"],
          data["true_labels_test"],
          sample_weight=np.random.randn(len(data["true_labels_test"])),
      )
      cl.fit(
          data["X_test"],
          data["true_labels_test"],
          label_issues=cl.get_label_issues(),
          sample_weight=np.random.randn(len(data["true_labels_test"])),
      )
  
imports: from copy import deepcopy
  import warnings
  from sklearn.linear_model import LogisticRegression
  from sklearn.base import BaseEstimator
  from sklearn.model_selection import GridSearchCV
  import scipy
  import pytest
  import numpy
  import pandas
  from cleanlab.classification import CleanLearning
  from cleanlab.benchmarking.noise_generation import generate_noise_matrix_from_trace
  from cleanlab.benchmarking.noise_generation import generate_noisy_labels
  from cleanlab.internal.latent_algebra import compute_inv_noise_matrix
  from cleanlab.count import compute_confident_joint, estimate_cv_predicted_probabilities, get_confident_thresholds
  from cleanlab.filter import find_label_issues
label_desc: Use image node_id 8 for calling a global function with example usage: test_aux_inputs() without return types