def METHOD_NAME(self):
    """Computes the size of the tooltip, and creates the label objects
    for each line.
    Overrides PlotComponent.
    """
    if not self._text_props_valid:
        self._recompute_text()
    outer_bounds = [
        self._max_line_width + 2 * self.border_padding + self.hpadding,
        self._total_line_height + 2 * self.border_padding + self.vpadding,
    ]
    self.outer_bounds = outer_bounds
    if self.auto_adjust and self.component is not None:
        new_pos = list(self.outer_position)
        for dimindex in (0, 1):
            pos = self.position[dimindex]
            extent = outer_bounds[dimindex]
            c_min = self.component.position[dimindex]
            c_max = c_min + self.component.bounds[dimindex]
            # Is the tooltip just too wide/tall?
            if extent > (c_max - c_min):
                new_pos[dimindex] = c_min
            # Does it extend over the c_max edge?  (right/top)
            elif pos + extent > c_max:
                new_pos[dimindex] = c_max - extent
            # Does it extend over the c_min edge? This is not an elif so
            # that we can fix the situation where the c_max edge adjustment
            # above pushes the position negative.
            if new_pos[dimindex] < c_min:
                new_pos[dimindex] = c_min
        self.outer_position = new_pos
    self._layout_needed = False