code: def test_add_image_with_metadata(ses):
      metadata = {"some_info": {"test": "ok!"}}
      ses.add_image("test1.jpg", metadata=metadata, refresh_after=True)
      r = ses.search_image("test1.jpg")
      assert r[0]["metadata"] == metadata
      assert "path" in r[0]
      assert "score" in r[0]
      assert "dist" in r[0]
      assert "id" in r[0]
  
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 17 for calling a global function with example usage: test_add_image_with_metadata(ses) without return types