code: def test_L(doc):
      state = StateClass(doc)
      assert state.L(2, 1) == -1
      state.add_arc(2, 1, 0)
      assert state.arcs == [{"head": 2, "child": 1, "label": 0}]
      assert state.L(2, 1) == 1
      state.add_arc(2, 0, 0)
      assert state.L(2, 1) == 0
      assert state.n_L(2) == 2
  
file_path: spacy/spacy/tests/parser/test_state.py
imports: import pytest
  from spacy.pipeline._parser_internals.stateclass import StateClass
  from spacy.tokens.doc import Doc
  from spacy.vocab import Vocab
label_desc: Use image node_id 7 for calling a global function with example usage: test_L(doc) without return types