class_docstr: A TextItem that attaches itself to a TargetItem.
  
  This class extends TextItem with the following features :
    * Automatically positions adjacent to the symbol at a fixed position.
    * Automatically reformats text when the symbol location has changed.
  
  Parameters
  ----------
  target : TargetItem
      The TargetItem to which this label will be attached to.
  text : str or callable, Optional
      Governs the text displayed, can be a fixed string or a format string
      that accepts the x, and y position of the target item; or be a callable
      method that accepts a tuple (x, y) and returns a string to be displayed.
      If None, an empty string is used.  Default is None
  offset : tuple or list or QPointF or QPoint
      Position to set the anchor of the TargetLabel away from the center of
      the target in pixels, by default it is (20, 0).
  anchor : tuple or list or QPointF or QPoint
      Position to rotate the TargetLabel about, and position to set the
      offset value to see :class:`~pyqtgraph.TextItem` for more information.
  kwargs : dict 
      kwargs contains arguments that are passed onto
      :class:`~pyqtgraph.TextItem` constructor, excluding text parameter
class_docstr_tok: ["A","TextItem","that","attaches","itself","to","a","TargetItem",".","This","class","extends","TextItem","with","the","following","features",":","*","Automatically","positions","adjacent","to","the","symbol","at","a","fixed","position",".","*","Automatically","reformats","text","when","the","symbol","location","has","changed",".","Parameters","--","--","--","--","--","target",":","TargetItem","The","TargetItem","to","which","this","label","will","be","attached","to",".","text",":","str","or","callable",",","Optional","Governs","the","text","displayed",",","can","be","a","fixed","string","or","a","format","string","that","accepts","the","x",",","and","y","position","of","the","target","item",";","or","be","a","callable","method","that","accepts","a","tuple","(","x",",","y",")","and","returns","a","string","to","be","displayed",".","If","None",",","an","empty","string","is","used",".","Default","is","None","offset",":","tuple","or","list","or","QPointF","or","QPoint","Position","to","set","the","anchor","of","the","TargetLabel","away","from","the","center","of","the","target","in","pixels",",","by","default","it","is","(","20",",","0",")",".","anchor",":","tuple","or","list","or","QPointF","or","QPoint","Position","to","rotate","the","TargetLabel","about",",","and","position","to","set","the","offset","value","to","see",":","class",":","`","~pyqtgraph.TextItem","`","for","more","information",".","kwargs",":","dict","kwargs","contains","arguments","that","are","passed","onto",":","class",":","`","~pyqtgraph.TextItem","`","constructor",",","excluding","text","parameter"]
code: def format(self):
      return self._format
  
imports: import string
  from math import atan2
  from ..None import functions
  from ..Point import Point
  from ..Qt import QtCore, QtGui
  from .GraphicsObject import GraphicsObject
  from .ScatterPlotItem import Symbols
  from .TextItem import TextItem
  from .UIGraphicsItem import UIGraphicsItem
  from .ViewBox import ViewBox
label_desc: Use image node_id 2 for calling the TargetLabel obj's underlying member method code with example usage: obj.format() and returns: self