<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_for_python_keywords(self, kwargs):
 """When Python keywords seen, mutate to remove trailing underscore."""


        kwargs_copy = copy.deepcopy(kwargs)
        for key, val in iteritems(kwargs):
            if isinstance(val, dict):
                kwargs_copy[key] = self._check_for_python_keywords(val)
            elif isinstance(val, list):
                kwargs_copy[key] = self._iter_list_for_dicts(val)
            else:
                if key.endswith('_'):
                    strip_key = key.rstrip('_')
                    if keyword.iskeyword(strip_key):
                        kwargs_copy[strip_key] = val
                        kwargs_copy.pop(key)
        return kwargs_copy