code: def test_glrenderer():
      w, h = 400, 200
      renderer = glrenderer.MeshRenderer((w, h))
      renderer.fovy = 90
      position = [[0, 1, -1], [-2, -1, -1], [2, -1, -1]]
      color = [[1, 0, 0], [0, 1, 0], [0, 0, 1]]
      img = renderer.render_mesh(position, color)
      img, alpha = img[..., :3], img[..., 3]
  
      assert all(img[0, 0] == 0)  # black corner
      assert all(img[0, -1] == 0)  # black corner
      assert img[10, w // 2].argmax() == 0  # red corner
      assert img[-1, 10].argmax() == 1  # green corner
      assert img[-1, -10].argmax() == 2  # blue corner
      assert np.abs(img.sum(-1) - alpha).max() < 1e-5
  
imports: from __future__ import absolute_import, division, print_function
  import pytest
  import os
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: test_glrenderer() without return types