code: def check_type_helper(
      data, actual_type, valid_choices, invalid_choices
  ):
      """Help to check if distribution types are interpreted correctly."""
      for valid_choice in valid_choices:
          prep = FloatTransformer(transformer=valid_choice)
          prep.fit(data)
          assert prep.dist_type_ == actual_type
  
      for invalid_choice in invalid_choices:
          with pytest.raises(ValueError) as exc:
              prep = FloatTransformer(transformer=invalid_choice)
              prep.fit(data)
              assert str(exc.value) == _TYPE_COMPLIANCE_ERROR.format(
                  invalid_choice, prep.inferred_type_
              )
  
imports: import sys
  import pytest
  import numpy
  import pandas
  from sklearn.utils import estimator_checks
  from fairlearn.adversarial import AdversarialFairnessClassifier, AdversarialFairnessRegressor
  from fairlearn.adversarial._adversarial_mitigation import _AdversarialFairness
  from fairlearn.adversarial._preprocessor import FloatTransformer
  from fairlearn.adversarial._constants import _TYPE_COMPLIANCE_ERROR
  from .helper import get_instance, generate_data_combinations, cols, Bin2d, Bin1d, Cat, Cont2d, Cont1d, BCE, CCE, MSE, Keyword_CATEGORY, Keyword_BINARY, Keyword_CONTINUOUS, Keyword_CLASSIFICATION, Keyword_AUTO, KeywordToClass
label_desc: Use image node_id 18 for calling a global function with example usage: check_type_helper(data, actual_type, valid_choices, invalid_choices) without return types