code: def nms(
      boxes,
      scores=None,
      iou_threshold=0.5,
      max_output_size=None,
      score_threshold=float("-inf"),
  ):
      if scores is None:
          scores = tf.ones(boxes.shape[0])
  
      boxes = tf.gather(boxes, [1, 0, 3, 2], axis=1)
      ret = tf.image.non_max_suppression(
          boxes,
          scores,
          max_output_size or len(boxes),
          iou_threshold,
          score_threshold,
      )
  
      return tf.cast(ret, dtype=tf.int64)
  
imports: from typing import Optional, Tuple, Union, Sequence
  import tensorflow
  from tensorflow.python.types.core import Tensor
  import ivy
  from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes
  from .None import backend_version
  from ivy.functional.ivy.layers import _deconv_length, _get_x_data_format
label_desc: Use image node_id 20 for calling a global function with example usage: nms(boxes, scores, iou_threshold, max_output_size, score_threshold) and returns: tf