code: def get_box_tensor(boxes: Union[Tensor, BaseBoxes]) -> Tensor:
      """Get tensor data from box type boxes.
  
      Args:
          boxes (Tensor or BaseBoxes): boxes with type of tensor or box type.
              If its type is a tensor, the boxes will be directly returned.
              If its type is a box type, the `boxes.tensor` will be returned.
  
      Returns:
          Tensor: boxes tensor.
      """
      if isinstance(boxes, BaseBoxes):
          boxes = boxes.tensor
      return boxes
  
imports: from typing import List, Optional, Sequence, Tuple, Union
  import numpy
  import torch
  from torch import Tensor
  from mmdet.structures.bbox import BaseBoxes
label_desc: Use image node_id 20 for calling a global function with example usage: get_box_tensor(boxes) and returns: boxes