code: def roots(g):
      "Get nodes from graph G with indegree 0"
      return set(n for n, d in iteritems(g.in_degree()) if d == 0)
  
imports: from __future__ import unicode_literals
  from contextlib import contextmanager
  import errno
  from functools import partial
  from io import BytesIO
  from subprocess import Popen, PIPE
  from networkx import topological_sort
  from six import iteritems
  from zipline.pipeline.data import BoundColumn
  from zipline.pipeline import Filter, Factor, Classifier, Term
  from zipline.pipeline.term import AssetExists
label_desc: Use image node_id 7 for calling a global function with example usage: roots(g) and returns: set