<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _activate_left(self, token):
 """ Activate from the left. In case of a valid token this activations test the right memory with the given token and looks for the number of matches. The token and the number of occurences are stored in the left memory. If the number of matches is zero the token activates all children. """

        if not self.right_memory:
            if token.is_valid():
                self.left_memory[token.to_info()] = 0
            else:
                del self.left_memory[token.to_info()]

            for child in self.children:
                child.callback(token)

        elif token.is_valid():
            count = 0

            for _, right_context in self.right_memory:
                if self.matcher(token.context, dict(right_context)):
                    count += 1

            if count == 0:
                for child in self.children:
                    child.callback(token)

            self.left_memory[token.to_info()] = count
        else:
            count = 0
            for _, right_context in self.right_memory:
                if self.matcher(token.context, dict(right_context)):
                    count += 1
                    break

            if count == 0:
                for child in self.children:
                    child.callback(token)

            del self.left_memory[token.to_info()]