<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _maybe_trim_strings(self, array, **keys):
 """ if requested, trim trailing white space from all string fields in the input array """

        trim_strings = keys.get('trim_strings', False)
        if self.trim_strings or trim_strings:
            _trim_strings(array)