code: def test_passes_sample_weight(refit):
      class CustomLR(LogisticRegression):
          def fit(self, X, y, sample_weight=None):
              assert sample_weight is not None
              super().fit(X, y)
  
      mod = Thresholder(CustomLR(), threshold=0.5, refit=refit)
      np.random.seed(42)
      X = np.random.normal(0, 1, (100, 3))
      y = np.random.normal(0, 1, (100,)) < 0
      weight = np.random.random(100)
  
      mod.fit(X, y, sample_weight=weight)
  
file_path: scikit-lego/tests/test_meta/test_thresholder.py
imports: import numpy
  import pytest
  from sklearn.dummy import DummyClassifier
  from sklearn.ensemble import HistGradientBoostingClassifier, StackingClassifier
  from sklearn.linear_model import LinearRegression, LogisticRegression
  from sklego.common import flatten
  from sklego.meta import Thresholder
  from tests.conftest import classifier_checks, general_checks, select_tests
label_desc: Use image node_id 8 for calling a global function with example usage: test_passes_sample_weight(refit) without return types