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"]:
          pytest.raises(
              ValueError,
              lambda: font.getmask2(
                  "hello", anchor=anchor, direction="ttb"
              ),
          )
          pytest.raises(
              ValueError,
              lambda: font.getbbox(
                  "hello", anchor=anchor, direction="ttb"
              ),
          )
          pytest.raises(
              ValueError,
              lambda: d.text(
                  (0, 0), "hello", anchor=anchor, direction="ttb"
              ),
          )
          pytest.raises(
              ValueError,
              lambda: d.textbbox(
                  (0, 0), "hello", anchor=anchor, direction="ttb"
              ),
          )
          pytest.raises(
              ValueError,
              lambda: d.multiline_text(
                  (0, 0), "foo\nbar", anchor=anchor, direction="ttb"
              ),
          )
          pytest.raises(
              ValueError,
              lambda: d.multiline_textbbox(
                  (0, 0), "foo\nbar", anchor=anchor, direction="ttb"
              ),
          )
      # ttb multiline text does not support anchors at all
      pytest.raises(
          ValueError,
          lambda: d.multiline_text(
              (0, 0), "foo\nbar", anchor="mm", direction="ttb"
          ),
      )
      pytest.raises(
          ValueError,
          lambda: d.multiline_textbbox(
              (0, 0), "foo\nbar", anchor="mm", direction="ttb"
          ),
      )
  
imports: 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