<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_valence(self):
 """ check valences of all atoms :return: list of invalid atoms """

        return [x for x, atom in self.atoms() if not atom.check_valence(self.environment(x))]