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: Args:
      box_size (height, width): Size of the reference box.
      boundary_threshold (int): Boxes that extend beyond the reference box
          boundary by more than boundary_threshold are considered "outside".
  
  Returns:
      a binary vector, indicating whether each box is inside the reference box.
docstr_tok: ["Args",":","box_size","(","height",",","width",")",":","Size","of","the","reference","box",".","boundary_threshold","(","int",")",":","Boxes","that","extend","beyond","the","reference","box","boundary","by","more","than","boundary_threshold","are","considered","``","outside","''",".","Returns",":","a","binary","vector",",","indicating","whether","each","box","is","inside","the","reference","box","."]
code: def inside_box(
      self, box_size: Tuple[int, int], boundary_threshold: int = 0
  ) -> torch.Tensor:
      """
      Args:
          box_size (height, width): Size of the reference box.
          boundary_threshold (int): Boxes that extend beyond the reference box
              boundary by more than boundary_threshold are considered "outside".
  
      Returns:
          a binary vector, indicating whether each box is inside the reference box.
      """
      height, width = box_size
      inds_inside = (
          (self.tensor[..., 0] >= -boundary_threshold)
          & (self.tensor[..., 1] >= -boundary_threshold)
          & (self.tensor[..., 2] < width + boundary_threshold)
          & (self.tensor[..., 3] < height + boundary_threshold)
      )
      return inds_inside
  
imports: import math
  import numpy
  from enum import IntEnum, unique
  from typing import List, Tuple, Union
  import torch
  from torch import device
label_desc: Use image node_id 10 for calling the Boxes obj's underlying member method code with example usage: obj.inside_box(box_size, boundary_threshold) and returns: inds_inside