docstr: Calculate the number of text labels to plot at the bottom of the box
  without going out of frames.
  Args:
      box_coordinate (array-like): shape (4,). The (x_left, y_top, x_right, y_bottom)
      coordinates of the box.
      num_text (int): the number of text labels to plot.
      textbox_width (float): the width of the box wrapped around text label.
docstr_tok: ["Calculate","the","number","of","text","labels","to","plot","at","the","bottom","of","the","box","without","going","out","of","frames",".","Args",":","box_coordinate","(","array-like",")",":","shape","(","4",",",")",".","The","(","x_left",",","y_top",",","x_right",",","y_bottom",")","coordinates","of","the","box",".","num_text","(","int",")",":","the","number","of","text","labels","to","plot",".","textbox_width","(","float",")",":","the","width","of","the","box","wrapped","around","text","label","."]
code: def _align_y_bottom(
      self,
      box_coordinate: torch.Tensor,
      num_text: int,
      textbox_width: float,
  ) -> int:
      """
      Calculate the number of text labels to plot at the bottom of the box
      without going out of frames.
      Args:
          box_coordinate (array-like): shape (4,). The (x_left, y_top, x_right, y_bottom)
          coordinates of the box.
          num_text (int): the number of text labels to plot.
          textbox_width (float): the width of the box wrapped around text label.
      """
      dist_to_bottom = self.output.height - box_coordinate[3]
      num_text_bottom = dist_to_bottom // textbox_width
  
      if isinstance(num_text_bottom, torch.Tensor):
          num_text_bottom = int(num_text_bottom.item())
  
      return min(num_text, num_text_bottom)
  
imports: from __future__ import annotations
  import itertools
  import logging
  from types import SimpleNamespace
  from typing import Dict, List, Optional, Tuple, Union
  import matplotlib.pyplot
  import numpy
  import torch
  from detectron2.utils.visualizer import Visualizer
label_desc: Use image node_id 8 for calling the ImgVisualizer obj's underlying member method code with example usage: obj._align_y_bottom(box_coordinate, num_text, textbox_width) and returns: min