code: def assertDepends(self, source, edges, undefined=None, modified=None):
      mod = ast.parse(source)
  
      gen = GraphGen(call_deps=True)
      gen.visit(mod)
  
      self.assertSetEqual(set(gen.graph.edges()), edges)
  
      if undefined is not None:
          self.assertSetEqual(set(gen.undefined), undefined)
      if modified is not None:
          self.assertSetEqual(set(gen.modified), modified)
  
      tested.update(mod)
      return gen
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import unittest
  import ast
  from ...asttools.visitors.graph_visitor import GraphGen
  from ...asttools.visitors.graph_visitor import DiGraph
  from ...asttools.tests import AllTypesTested, skip_networkx
label_desc: Use image node_id 1 for calling the Test obj's underlying member method code with example usage: obj.assertDepends(source, edges, undefined, modified) and returns: gen