code: def empty_box_as(
      boxes: Union[Tensor, BaseBoxes]
  ) -> Union[Tensor, BaseBoxes]:
      """Generate empty box according to input ``boxes` type and device.
  
      Args:
          boxes (Tensor or :obj:`BaseBoxes`): boxes with type of tensor
              or box type.
  
      Returns:
          Union[Tensor, BaseBoxes]: Generated empty box.
      """
      if isinstance(boxes, BaseBoxes):
          return boxes.empty_boxes()
      else:
          # Tensor boxes will be treated as horizontal boxes by defaults
          return boxes.new_zeros(0, 4)
  
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 21 for calling a global function with example usage: empty_box_as(boxes) and returns: boxes, boxes