code: def test_fit_with_nm(
      format,
      seed=SEED,
      used_by_another_test=False,
  ):
      data = DATA_FORMATS[format]
      cl = CleanLearning(
          seed=seed,
      )
      nm = data["noise_matrix"]
      # Learn with noisy labels with noise matrix given
      cl.fit(data["X_train"], data["labels"], noise_matrix=nm)
      score_nm = cl.score(data["X_test"], data["true_labels_test"])
      # Learn with noisy labels and estimate the noise matrix.
      cl2 = CleanLearning(
          seed=seed,
      )
      cl2.fit(
          data["X_train"],
          data["labels"],
      )
      score = cl2.score(data["X_test"], data["true_labels_test"])
      if used_by_another_test:
          return score, score_nm
      else:
          assert score < score_nm + 1e-4
  
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 18 for calling a global function with example usage: test_fit_with_nm(format, seed, used_by_another_test) and returns: score,  score_nm