def __init__(self, prediction, tokens):
self._edges = defaultdict(set)<EOL>self._vertices = set((<NUM_LIT:0>,))<EOL>for dep, head in enumerate(prediction[tokens]):<EOL><INDENT>self._vertices.add(dep + <NUM_LIT:1>)<EOL>self._edges[head].add(dep + <NUM_LIT:1>)<EOL><DEDENT>self._indices = {}<EOL>self._lowlinks = {}<EOL>self._onstack = defaultdict(lambda: False)<EOL>self._SCCs = []<EOL>index = <NUM_LIT:0><EOL>stack = []<EOL>for v in self.vertices:<EOL><INDENT>if v not in self.indices:<EOL><INDENT>self.strongconnect(v, index, stack)<EOL><DEDENT><DEDENT>
Parameters
----------
prediction : numpy.ndarray
    a predicted dependency tree where prediction[dep_idx] = head_idx
tokens : numpy.ndarray
    the tokens we care about (i.e. exclude _GO, _EOS, and _PAD)