code: def search_output_names(graphdef: tf.compat.v1.GraphDef) -> List[str]:
      nodes = set(
          n.name
          for n in graphdef.node
          if n.name.split("/")[-1] not in CONST_NAME
      )
      for n in graphdef.node:
          for input_node in n.input:
              if input_node in nodes:
                  nodes.remove(input_node)
      return list(nodes)
  
imports: from google.protobuf import text_format
  import tensorflow
  from typing import List
label_desc: Use image node_id 4 for calling a global function with example usage: search_output_names(graphdef) and returns: list