code: def _save_failed_test(data, expect, filename):
      from ..io import _make_png
  
      commit, error = run_subprocess(["git", "rev-parse", "HEAD"])
      name = filename.split("/")
      name.insert(-1, commit.strip())
      filename = "/".join(name)
      host = "data.vispy.org"
  
      # concatenate data, expect, and diff into a single image
      ds = data.shape
      es = expect.shape
  
      shape = (
          max(ds[0], es[0]) + 4,
          ds[1] + es[1] + 8 + max(ds[1], es[1]),
          4,
      )
      img = np.empty(shape, dtype=np.ubyte)
      img[..., :3] = 100
      img[..., 3] = 255
  
      img[2 : 2 + ds[0], 2 : 2 + ds[1], : ds[2]] = data
      img[
          2 : 2 + es[0], ds[1] + 4 : ds[1] + 4 + es[1], : es[2]
      ] = expect
  
      diff = make_diff_image(data, expect)
      img[2 : 2 + diff.shape[0], -diff.shape[1] - 2 : -2] = diff
  
      png = _make_png(img)
      conn = HTTPConnection(host)
      req = urlencode({"name": filename, "data": base64.b64encode(png)})
      conn.request("POST", "/upload.py", req)
      response = conn.getresponse().read()
      conn.close()
      print(
          "\nImage comparison failed. Test result: %s %s   Expected result: "
          "%s %s" % (data.shape, data.dtype, expect.shape, expect.dtype)
      )
      print("Uploaded to: \nhttp://%s/data/%s" % (host, filename))
      if not response.startswith(b"OK"):
          print("WARNING: Error uploading data to %s" % host)
          print(response)
  
imports: import time
  import os
  import sys
  import inspect
  import base64
  from subprocess import check_call, CalledProcessError
  import numpy
  from http.client import HTTPConnection
  from urllib.parse import urlencode
  from ..None import scene, config
  from ..io import read_png, write_png
  from ..gloo.util import _screenshot
  from ..util import run_subprocess
  from .None import IS_CI
label_desc: Use image node_id 5 for calling a global function with example usage: _save_failed_test(data, expect, filename) without return types