def METHOD_NAME(self, courses, querystring="", **extra):
    """
    Not a test.
    Prepare the ElasticSearch index and execute the query in it.
    """
    # Delete any existing indices so we get a clean slate
    ES_INDICES_CLIENT.delete(index="_all")
    # Create an index we'll use to test the ES features
    ES_INDICES_CLIENT.create(index=COURSES_INDEX)
    # The index needs to be closed before we set an analyzer
    ES_INDICES_CLIENT.close(index=COURSES_INDEX)
    ES_INDICES_CLIENT.put_settings(body=ANALYSIS_SETTINGS, index=COURSES_INDEX)
    ES_INDICES_CLIENT.open(index=COURSES_INDEX)
    # Use the default courses mapping from the Indexer
    ES_INDICES_CLIENT.put_mapping(body=CoursesIndexer.mapping, index=COURSES_INDEX)
    # Add the sorting script
    ES_CLIENT.put_script(id="score", body=CoursesIndexer.scripts["score"])
    ES_CLIENT.put_script(
        id="state_field", body=CoursesIndexer.scripts["state_field"]
    )
    # Actually insert our courses in the index
    actions = [
        {
            "_id": course["id"],
            "_index": COURSES_INDEX,
            "_op_type": "create",
            "absolute_url": {"en": "en/url", "fr": "fr/url"},
            "categories": ["1", "2", "3"],
            "cover_image": {"en": "en/image", "fr": "fr/image"},
            "is_meta": False,
            "logo": {"en": "/en/some/img.png", "fr": "/fr/some/img.png"},
            "nb_children": 0,
            "organizations": ["11", "12", "13"],
            **course,
        }
        for course in courses
    ]
    bulk_compat(actions=actions, chunk_size=500, client=ES_CLIENT)
    ES_INDICES_CLIENT.refresh()
    results = self.client.get(
        f"/api/v1.0/courses/autocomplete/?{querystring:s}", **extra
    )
    self.assertEqual(results.status_code, 200)
    return json.loads(results.content)