code: def test_algebra():
      p = fitz.Point(1, 2)
      m = fitz.Matrix(1, 2, 3, 4, 5, 6)
      r = fitz.Rect(1, 1, 2, 2)
      assert p + p == p * 2
      assert p - p == fitz.Point()
      assert m + m == m * 2
      assert m - m == fitz.Matrix()
      assert r + r == r * 2
      assert r - r == fitz.Rect()
      assert p + 5 == fitz.Point(6, 7)
      assert m + 5 == fitz.Matrix(6, 7, 8, 9, 10, 11)
      assert r.tl in r
      assert r.tr not in r
      assert r.br not in r
      assert r.bl not in r
      assert p * m == fitz.Point(12, 16)
      assert r * m == fitz.Rect(9, 12, 13, 18)
      assert (fitz.Rect(1, 1, 2, 2) & fitz.Rect(2, 2, 3, 3)).is_empty
      assert not fitz.Rect(1, 1, 2, 2).intersects((2, 2, 4, 4))
      failed = False
      try:
          x = m + p
      except:
          failed = True
      assert failed
      failed = False
      try:
          x = m + r
      except:
          failed = True
      assert failed
      failed = False
      try:
          x = p + r
      except:
          failed = True
      assert failed
      failed = False
      try:
          x = r + m
      except:
          failed = True
      assert failed
      assert m not in r
  
file_path: pymudf/tests/test_geometry.py
imports: import fitz
label_desc: Use image node_id 6 for calling a global function with example usage: test_algebra() without return types