code: def _nested_filter(tenant_id, project_id):
      return [
          {"term": {"image.metadata.tenant_id": tenant_id}},
          {"term": {"image.metadata.project_id": project_id}},
      ]
  
file_path: image-match/tests/test_elasticsearch_driver_metadata_as_nested.py
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 9 for calling a global function with example usage: _nested_filter(tenant_id, project_id) and returns: list