<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_classes(self, scope=-1):
 """ Check if pending identifiers are defined or not. If not, returns a syntax error. If no scope is given, the current one is checked. """

        for entry in self[scope].values():
            if entry.class_ is None:
                syntax_error(entry.lineno, "Unknown identifier '%s'" % entry.name)