def has_fit_parameter(estimator, parameter):
    return parameter in getargspec(estimator.fit)[0]
Checks whether the estimator's fit method supports the given parameter.
dataset/ETHPy150Open trevorstephens/gplearn/gplearn/skutils/validation.py/has_fit_parameter