<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def reset(self, state_size_changed=False):
 """Reset parser state. Parameters state_size_changed : `bool`, optional `True` if maximum state size changed (default: `False`). """

        if state_size_changed:
            self.state = deque(repeat('', self.state_size),
                               maxlen=self.state_size)
        else:
            self.state.extend(repeat('', self.state_size))
        self.end = True