def METHOD_NAME(self, text, tab_width, _label_cached):
    # Return the width of a text, according to the current line options.
    cid = u'{}\0{}\0{}'.format(text, self.password,
                               self._get_line_options())
    width = Cache_get('textinput.width', cid)
    if width is not None:
        return width
    lbl = self._create_line_label(text)
    width = lbl.width
    Cache_append('textinput.width', cid, width)
    return width