Verifies that counter value is greater than previous signature

def verify_counter(self, signature, counter):
        """ Verifies that counter value is greater than previous signature""" 

        devices = self.__get_u2f_devices()

        for device in devices:
            # Searching for specific keyhandle
            if device['keyHandle'] == signature['keyHandle']:
                if counter > device['counter']:
                    
                    # Updating counter record
                    device['counter'] = counter
                    self.__save_u2f_devices(devices)
                    
                    return True
                else:
                    return False