code: def _onnx_get_num_anchors_and_pre_nms_top_n(ob, orig_pre_nms_top_n):
      # type: (Tensor, int) -> Tuple[int, int]
      from torch.onnx import operators
  
      num_anchors = operators.shape_as_tensor(ob)[1].unsqueeze(0)
      pre_nms_top_n = torch.min(
          torch.cat(
              (
                  torch.tensor(
                      [orig_pre_nms_top_n], dtype=num_anchors.dtype
                  ),
                  num_anchors,
              ),
              0,
          )
      )
  
      return num_anchors, pre_nms_top_n
  
imports: from typing import List, Optional, Dict, Tuple
  import torch
  from torch import nn, Tensor
  from torch.nn import functional
  import torchvision
  from .None import det_utils
  from .None import boxes
  from .image_list import ImageList
label_desc: Use image node_id 1 for calling a global function with example usage: _onnx_get_num_anchors_and_pre_nms_top_n(ob, orig_pre_nms_top_n) and returns: num_anchors,  pre_nms_top_n