code: def check_edges(graph, source, target, num, isExtra=None):
      edges = [
          edge
          for edge in graph.edge
          if edge.source == source and edge.target == target
      ]
      assert len(edges) == num
      if num == 1:
          assert edges[0].isExtra == isExtra
  
imports: import pytest
  import stanza
  from stanza.tests import *
  from stanza.models.common.doc import Document
  import stanza.server.ud_enhancer
label_desc: Use image node_id 1 for calling a global function with example usage: check_edges(graph, source, target, num, isExtra) without return types