class_docstr: This structure stores a list of boxes as a Nx4 torch.Tensor.
  It supports some common methods about boxes
  (`area`, `clip`, `nonempty`, etc),
  and also behaves like a Tensor
  (support indexing, `to(device)`, `.device`, and iteration over all boxes)
  
  Attributes:
      tensor (torch.Tensor): float matrix of Nx4. Each row is (x1, y1, x2, y2).
class_docstr_tok: ["This","structure","stores","a","list","of","boxes","as","a","Nx4","torch.Tensor",".","It","supports","some","common","methods","about","boxes","(","`","area","`",",","`","clip","`",",","`","nonempty","`",",","etc",")",",","and","also","behaves","like","a","Tensor","(","support","indexing",",","`","to","(","device",")","`",",","`",".device","`",",","and","iteration","over","all","boxes",")","Attributes",":","tensor","(","torch.Tensor",")",":","float","matrix","of","Nx4",".","Each","row","is","(","x1",",","y1",",","x2",",","y2",")","."]
docstr: Concatenates a list of Boxes into a single Boxes
  
  Arguments:
      boxes_list (list[Boxes])
  
  Returns:
      Boxes: the concatenated Boxes
docstr_tok: ["Concatenates","a","list","of","Boxes","into","a","single","Boxes","Arguments",":","boxes_list","(","list","[","Boxes","]",")","Returns",":","Boxes",":","the","concatenated","Boxes"]
code: def cat(cls, boxes_list):
      """
      Concatenates a list of Boxes into a single Boxes
  
      Arguments:
          boxes_list (list[Boxes])
  
      Returns:
          Boxes: the concatenated Boxes
      """
      assert isinstance(boxes_list, (list, tuple))
      if len(boxes_list) == 0:
          return cls(torch.empty(0))
      assert all([isinstance(box, Boxes) for box in boxes_list])
  
      # use torch.cat (v.s. layers.cat) so the returned boxes never share storage with input
      cat_boxes = cls(torch.cat([b.tensor for b in boxes_list], dim=0))
      return cat_boxes
  
imports: import math
  from enum import IntEnum, unique
  from typing import Any, List, Tuple, Union
  import numpy
  import torch
label_desc: Use image node_id 13 for calling the Boxes obj's underlying member method code with example usage: obj.cat(cls, boxes_list) and returns: cat_boxes, cls