code: def find_out_terminal_node(graph_def, **kwargs):
      def add_postfix(names):
          return ["{}:0".format(n) for n in names]
  
      unlike_output_types = ["Const", "Assign", "NoOp", "Placeholder"]
      terminal_inputs = []
      terminal_outputs = []
      input_cnt = collections.Counter()
      need_add_postfix = kwargs.get("postfix", False)
      for node in graph_def.node:
          for input in node.input:
              input = _strip_node_name(input)
              input_cnt[input] += 1
          if node.op == "Placeholder":
              strip_name = _strip_node_name(node.name)
              terminal_inputs.append(strip_name)
  
      for node in graph_def.node:
          if (
              input_cnt[node.name] == 0
              and node.op not in unlike_output_types
          ):
              terminal_outputs.append(node.name)
  
      if need_add_postfix:
          terminal_inputs = add_postfix(terminal_inputs)
          terminal_outputs = add_postfix(terminal_outputs)
  
      return terminal_inputs, terminal_outputs
  
file_path: nnabla/python/src/nnabla/utils/converter/tensorflow/common.py
imports: import collections
  from .refine_graph import RefineGraph
  from .refine_parser import RefineParser
label_desc: Use image node_id 2 for calling a global function with example usage: find_out_terminal_node(graph_def) and returns: terminal_inputs,  terminal_outputs, unknown