code: def test_square_draw():
      """Test drawing squares without transforms using PolygonVisual"""
      pos = np.array(
          [
              [-0.5, 0.5, 0],
              [0.5, 0.5, 0],
              [0.5, -0.5, 0],
              [-0.5, -0.5, 0],
          ]
      )
      with TestingCanvas() as c:
          polygon = visuals.Polygon(
              pos=pos, color=(1, 0, 0, 1), parent=c.scene
          )
          polygon.transform = transforms.STTransform(
              scale=(50, 50), translate=(50, 50)
          )
  
          assert_image_approved(c.render(), "visuals/square1.png")
  
          polygon.parent = None
          polygon = visuals.Polygon(
              pos=pos,
              color=(1, 0, 0, 1),
              border_color=(1, 1, 1, 1),
              parent=c.scene,
          )
          polygon.transform = transforms.STTransform(
              scale=(50, 50), translate=(50, 50)
          )
  
          assert_image_approved(c.render(), "visuals/square2.png")
  
          polygon.parent = None
          polygon = visuals.Polygon(
              pos=pos, border_color=(1, 1, 1, 1), parent=c.scene
          )
          polygon.transform = transforms.STTransform(
              scale=(50, 50), translate=(50, 50)
          )
  
          assert_image_approved(
              c.render(), "visuals/square3.png", min_corr=0.45
          )
  
imports: import numpy
  from vispy.scene import visuals, transforms
  from vispy.testing import requires_application, requires_scipy, TestingCanvas, run_tests_if_main
  from vispy.testing.image_tester import assert_image_approved
label_desc: Use image node_id 1 for calling a global function with example usage: test_square_draw() without return types