code: def get_top_ops(torch_threshold, nn_fn_threshold, with_counts=False):
      denylist = set(
          {
              # These are either not real "operators", factory functions
              # that trivially work, or not-documented ops.
              "load",
              "no_grad",
              "save",
              "from_numpy",
              "manual_seed",
              "set_grad_enabled",
              "set_default_tensor_type",
              "set_num_threads",
              "set_printoptions",
              "numel",
              "set_default_dtype",
              "sparse_coo_tensor",
              "set_rng_state",
              "get_rng_state",
              "get_default_dtype",
              "initial_seed",
              "get_num_threads",
              "quantize_per_tensor",
              "hann_window",
              "is_tensor",
              "as_tensor",
              "equal",
              "enable_grad",
              "seed",
              "is_storage",
              "is_floating_point",
              "nn.functional.torch",
              "set_flush_denormal",
              "set_num_interop_threads",
              "dequantize",
              "get_num_interop_threads",
              "nn.functional.math",
              "nn.functional.threshold_",
              "nn.functional.selu_",
              "nn.functional.elu_",
              "nn.functional.rrelu_",
              "nn.functional.leaky_relu_",
              "nn.functional.hardtanh_",
              "nn.functional.has_torch_function",
              "nn.functional.has_torch_function_unary",
              "nn.functional.has_torch_function_variadic",
              "nn.functional.handle_torch_function",
              "nn.functional.adaptive_max_pool1d_with_indices",
              "nn.functional.adaptive_max_pool2d_with_indices",
              "nn.functional.adaptive_max_pool3d_with_indices",
              "nn.functional.fractional_max_pool2d_with_indices",
              "nn.functional.fractional_max_pool3d_with_indices",
              "is_complex",
              "grad",
              "quantize_per_channel",
              "nn.functional.max_pool2d_with_indices",
              "nn.functional.max_pool3d_with_indices",
              "nn.functional.max_pool1d_with_indices",
              "nn.functional.celu_",
              "nn.functional.grad",
              "nn.functional.relu_",
              "nn.functional.boolean_dispatch",
              "nn.functional.assert_int_or_pair",
              "fft",  # is namespace
          }
      )
  
      torch_ops = top_ops.top_torch
      nn_fn_ops = top_ops.get_nn_functional_top_list()
      torch_ops = [op for op in torch_ops if op[0] not in denylist]
      nn_fn_ops = [op for op in nn_fn_ops if op[0] not in denylist]
  
      ops = torch_ops[:torch_threshold] + nn_fn_ops[:nn_fn_threshold]
  
      # Now, sort by priority
      ops.sort(reverse=True, key=lambda op: op[1])
      if not with_counts:
          ops = [op[0] for op in ops]
      return ops
  
imports: import torch
  import copy
  from torch.testing._internal.common_methods_invocations import op_db
  from functorch_additional_op_db import additional_op_db
  from enum import Enum
  import torch._functorch.top_operators_github_usage
  import pprint
  import unittest
  import enum
  from torch.testing._internal.common_device_type import toleranceOverride
  import test_ops
  import test_vmap
label_desc: Use image node_id 8 for calling a global function with example usage: get_top_ops(torch_threshold, nn_fn_threshold, with_counts) and returns: ops