def _merge_defaults(self, data, method_params, defaults):
        """Helper method for adding default values to the data dictionary.

        The `defaults` are the default values inspected from the method that
        will be called. For any values that are not present in the incoming
        data, the default value is added.
        """
        if defaults:
            optional_args = method_params[-len(defaults):]
            for key, value in zip(optional_args, defaults):
                if not key in data:
                    data[key] = value
        return data
Helper method for adding default values to the data dictionary.

        The `defaults` are the default values inspected from the method that
        will be called. For any values that are not present in the incoming
        data, the default value is added.