code: def fill_outputs(gd):
      """
      Fills the output lists of of a graph of ParsedNode
  
      Takes a graph in "dict{str, ParsedNode}" form, and returns a new graph.
      """
      # fill outputs
      for k, v in gd.items():
          for i in v.inputs:
              gd[i].outputs.append(v.name)
          for i in v.control_inputs:
              gd[i].control_outputs.append(v.name)
      get_tuple_ops = ["Split", "SplitV", "LSTMBlock"]
      for k, v in gd.items():
          if v.op in get_tuple_ops:
              outputs = [
                  [out, int(gd[out].attr["index"])] for out in v.outputs
              ]
              outputs.sort(key=lambda x: x[1])
              gd[k].outputs = [out for [out, _] in outputs]
  
      return gd
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import six
label_desc: Use image node_id 17 for calling a global function with example usage: fill_outputs(gd) and returns: gd