<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def find_weights(self, scorer, test_size=0.2, method='SLSQP'):
 """Finds optimal weights for weighted average of models. Parameters scorer : function Scikit-learn like metric. test_size : float, default 0.2 method : str Type of solver. Should be one of: - 'Nelder-Mead' - 'Powell' - 'CG' - 'BFGS' - 'Newton-CG' - 'L-BFGS-B' - 'TNC' - 'COBYLA' - 'SLSQP' - 'dogleg' - 'trust-ncg' Returns ------- list """

        p = Optimizer(self.models, test_size=test_size, scorer=scorer)
        return p.minimize(method)