code: def test_cj_in_find_label_issues_kwargs(filter_by, seed):
      labels = DATA["labels"]
      num_issues = []
      for provide_confident_joint in [True, False]:
          print(
              f"\nfilter_by: {filter_by} | seed: {seed} | cj_provided: {provide_confident_joint}"
          )
          np.random.seed(seed=seed)
          if provide_confident_joint:
              pred_probs = estimate_cv_predicted_probabilities(
                  X=DATA["X_train"], labels=labels, seed=seed
              )
              confident_joint = compute_confident_joint(
                  labels=labels, pred_probs=pred_probs
              )
              cl = CleanLearning(
                  find_label_issues_kwargs={
                      "confident_joint": confident_joint,
                      "filter_by": "both",
                      "min_examples_per_class": 1,
                  },
                  verbose=1,
              )
          else:
              cl = CleanLearning(
                  clf=LogisticRegression(random_state=seed),
                  find_label_issues_kwargs={
                      "filter_by": "both",
                      "min_examples_per_class": 1,
                  },
                  verbose=0,
              )
          label_issues_df = cl.find_label_issues(
              DATA["X_train"], labels=labels
          )
          label_issues_mask = label_issues_df["is_label_issue"].values
          # Check if the noise matrix was computed based on the passed in confident joint
          cj_reconstruct = (
              cl.inverse_noise_matrix * np.bincount(DATA["labels"])
          ).T.astype(int)
          np.all(cl.confident_joint == cj_reconstruct)
          num_issues.append(sum(label_issues_mask))
  
      # Chceck that the same exact number of issues are found regardless if the confident joint
      # is computed during find_label_issues or precomputed and provided as a kwargs parameter.
      assert num_issues[0] == num_issues[1]
  
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 32 for calling a global function with example usage: test_cj_in_find_label_issues_kwargs(filter_by, seed) without return types