<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_invalid_longitudes(self):
        '''
        Checks to ensure that all longitudes are in the range -180. to 180
        '''
        idlon = self.strain.data['longitude'] > 180.
        if np.any(idlon):
            self.strain.data['longitude'][idlon] = \
                self.strain.data['longitude'][idlon] - 360.