code: def test_transform_target_regressor_count_fit(check_inverse):
      # regression test for gh-issue #11618
      # check that we only call a single time fit for the transformer
      X, y = friedman
      ttr = TransformedTargetRegressor(
          transformer=DummyTransformer(), check_inverse=check_inverse
      )
      ttr.fit(X, y)
      assert ttr.transformer_.fit_counter == 1
  
imports: import numpy
  import pytest
  from sklearn import datasets
  from sklearn.base import BaseEstimator, TransformerMixin, clone
  from sklearn.compose import TransformedTargetRegressor
  from sklearn.dummy import DummyRegressor
  from sklearn.linear_model import LinearRegression, OrthogonalMatchingPursuit
  from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import FunctionTransformer, StandardScaler
  from sklearn.utils._testing import assert_allclose, assert_no_warnings
label_desc: Use image node_id 13 for calling a global function with example usage: test_transform_target_regressor_count_fit(check_inverse) without return types