docstr: Get the length of a given string, in pixels with 1/64 precision.
docstr_tok: ["Get","the","length","of","a","given","string",",","in","pixels","with","1\/64","precision","."]
code: def textlength(
      self,
      text,
      font=None,
      direction=None,
      features=None,
      language=None,
      embedded_color=False,
  ):
      """Get the length of a given string, in pixels with 1/64 precision."""
      if self._multiline_check(text):
          raise ValueError("can't measure length of multiline text")
      if embedded_color and self.mode not in ("RGB", "RGBA"):
          raise ValueError(
              "Embedded color supported only in RGB and RGBA modes"
          )
  
      if font is None:
          font = self.getfont()
      mode = "RGBA" if embedded_color else self.fontmode
      try:
          return font.getlength(
              text, mode, direction, features, language
          )
      except AttributeError:
          size = self.textsize(
              text,
              font,
              direction=direction,
              features=features,
              language=language,
          )
          if direction == "ttb":
              return size[1]
          return size[0]
  
imports: import math
  import numbers
  from .None import Image, ImageColor, ImageFont
label_desc: Use image node_id 22 for calling the ImageDraw obj's underlying member method code with example usage: obj.textlength(text, font, direction, features, language, embedded_color) and returns: font, size, size