<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _check_and_update_params(self, required, params):
 """ Ensure all required parameters were passed to the API call and format them correctly. """

        for r in required:
            if r not in params:
                raise PayPalError("Missing required param: %s" % r)

        # Upper case all the parameters for PayPal.
        return (dict((k.upper(), v) for k, v in params.items()))