code: def test_anchor_invalid_ttb():
      font = ImageFont.truetype(FONT_PATH, FONT_SIZE)
      im = Image.new("RGB", (100, 100), "white")
      d = ImageDraw.Draw(im)
      d.font = font
  
      for anchor in ["", "l", "a", "lax", "xa", "la", "ls", "ld", "lx"]:
          with pytest.raises(ValueError):
              font.getmask2("hello", anchor=anchor, direction="ttb")
          with pytest.raises(ValueError):
              font.getbbox("hello", anchor=anchor, direction="ttb")
          with pytest.raises(ValueError):
              d.text((0, 0), "hello", anchor=anchor, direction="ttb")
          with pytest.raises(ValueError):
              d.textbbox(
                  (0, 0), "hello", anchor=anchor, direction="ttb"
              )
          with pytest.raises(ValueError):
              d.multiline_text(
                  (0, 0), "foo\nbar", anchor=anchor, direction="ttb"
              )
          with pytest.raises(ValueError):
              d.multiline_textbbox(
                  (0, 0), "foo\nbar", anchor=anchor, direction="ttb"
              )
      # ttb multiline text does not support anchors at all
      with pytest.raises(ValueError):
          d.multiline_text(
              (0, 0), "foo\nbar", anchor="mm", direction="ttb"
          )
      with pytest.raises(ValueError):
          d.multiline_textbbox(
              (0, 0), "foo\nbar", anchor="mm", direction="ttb"
          )
  
imports: from __future__ import annotations
  import pytest
  from PIL import Image, ImageDraw, ImageFont
  from .helper import assert_image_similar_tofile, skip_unless_feature
label_desc: Use image node_id 20 for calling a global function with example usage: test_anchor_invalid_ttb() without return types