def METHOD_NAME(self, now_state: int, token: int):
    """ Search for an arc with the input being a token from the current state,
        returning the score on the arc and the state it points to. If there is
        no match, return to the starting state and perform an additional search
        from the starting state to avoid token consumption due to mismatches.
    """
    if token in self.graph[now_state]:
        return self.graph[now_state][token], self.context_score
    back_score = self.back_score[now_state]
    now_state = 0
    if token in self.graph[now_state]:
        return self.graph[now_state][
            token], back_score + self.context_score
    return 0, back_score