<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def TryConsume(self, token):
 """Tries to consume a given piece of text. Args: token: Text to consume. Returns: True iff the text was consumed. """

    if self.token == token:
      self.NextToken()
      return True
    return False