def has_fit_parameter(estimator, parameter):
    return parameter in signature(estimator.fit).parameters
Checks whether the estimator's fit method supports the given parameter.
dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/utils/validation.py/has_fit_parameter