finish is called at the end of the optimization.
- Return type
If you have things that also need to run in the method finish, you can create a method:
def _finish*(self, ... ): pass
Where the * can be any string. If present, _finish* will be called at the start of the default finish call. You may also completely overwrite this function.