code: def testIncident(self):
      g = Graph.Famous("petersen")
      g.to_directed()
  
      method_table = {
          "all": "all_edges",
          "in": "in_edges",
          "out": "out_edges",
      }
  
      for i in range(g.vcount()):
          vertex = g.vs[i]
          for mode, method_name in method_table.items():
              method = getattr(vertex, method_name)
              self.assertEqual(
                  g.incident(i, mode=mode),
                  [edge.index for edge in vertex.incident(mode=mode)],
              )
              self.assertEqual(
                  g.incident(i, mode=mode),
                  [edge.index for edge in method()],
              )
  
imports: import unittest
  from igraph import Graph, Vertex, VertexSeq
  from .utils import is_pypy
label_desc: Use image node_id 6 for calling the VertexTests obj's underlying member method code with example usage: obj.testIncident() without return types