code: def _onnx_expand_boxes(boxes, scale):
      # type: (Tensor, float) -> Tensor
      w_half = (boxes[:, 2] - boxes[:, 0]) * 0.5
      h_half = (boxes[:, 3] - boxes[:, 1]) * 0.5
      x_c = (boxes[:, 2] + boxes[:, 0]) * 0.5
      y_c = (boxes[:, 3] + boxes[:, 1]) * 0.5
  
      w_half = w_half.to(dtype=torch.float32) * scale
      h_half = h_half.to(dtype=torch.float32) * scale
  
      boxes_exp0 = x_c - w_half
      boxes_exp1 = y_c - h_half
      boxes_exp2 = x_c + w_half
      boxes_exp3 = y_c + h_half
      boxes_exp = torch.stack(
          (boxes_exp0, boxes_exp1, boxes_exp2, boxes_exp3), 1
      )
      return boxes_exp
  
imports: import math
  from typing import List, Tuple, Dict, Optional
  import torch
  from torch import nn, Tensor
  import torch.nn.functional
  import torchvision
  from .image_list import ImageList
label_desc: Use image node_id 6 for calling a global function with example usage: _onnx_expand_boxes(boxes, scale) and returns: boxes_exp