code: def test_elasticsearch_running(es):
      i = 0
      while i < 5:
          try:
              es.ping()
              assert True
              return
          except ConnectionError:
              i += 1
              sleep(2)
  
      pytest.fail(
          "Elasticsearch not running (failed to connect after {} tries)".format(
              str(i)
          )
      )
  
imports: import pytest
  import os
  import hashlib
  from elasticsearch import Elasticsearch, ConnectionError, RequestError, NotFoundError
  from time import sleep
  from image_match.elasticsearch_driver import SignatureES
  from PIL import Image
label_desc: Use image node_id 6 for calling a global function with example usage: test_elasticsearch_running(es) without return types