<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def build_parameters(self, stack, provider_stack=None):
 """Builds the CloudFormation Parameters for our stack. Args: stack (:class:`stacker.stack.Stack`):
 A stacker stack provider_stack (dict):
 An optional Stacker provider object Returns: dict: The parameters for the given stack """

        resolved = _resolve_parameters(stack.parameter_values, stack.blueprint)
        required_parameters = list(stack.required_parameter_definitions)
        all_parameters = list(stack.all_parameter_definitions)
        parameters = _handle_missing_parameters(resolved, all_parameters,
                                                required_parameters,
                                                provider_stack)

        param_list = []

        for key, value in parameters:
            param_dict = {"ParameterKey": key}
            if value is UsePreviousParameterValue:
                param_dict["UsePreviousValue"] = True
            else:
                param_dict["ParameterValue"] = str(value)

            param_list.append(param_dict)

        return param_list