code: def _get_ops_from_ops_list(input_file):
      """Gets the ops and kernels needed from the ops list file."""
      ops = set()
      ops_list_str = gfile.GFile(input_file, "r").read()
      if not ops_list_str:
          raise Exception("Input file should not be empty")
      ops_list = json.loads(ops_list_str)
      for op, kernel in ops_list:
          op_and_kernel = (op, kernel if kernel else None)
          ops.add(op_and_kernel)
      return ops
  
file_path: tensorflow-upstream/tensorflow/python/tools/selective_registration_header_lib.py
imports: import json
  import os
  import sys
  from google.protobuf import text_format
  from tensorflow.core.framework import graph_pb2
  from tensorflow.python.platform import gfile
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.util import _pywrap_kernel_registry
label_desc: Use image node_id 1 for calling a global function with example usage: _get_ops_from_ops_list(input_file) and returns: ops