def _make_minimize_function(scoring_function):
    """Create a minimize function.

    Given a maximization ``scoring_function`` convert it to minimize in order to work with
    ``hyperopt``, as ``benchmark`` works with ``maximization``.

    Also ``hyperopt`` params are being passed as a python ``dict``, we pass those as ``kwargs``
    to the ``scoring_function``.
    """
    def minimized_function(params):
        return -scoring_function(**params)

    return minimized_function