def METHOD_NAME(
    cls,
    media: AbstractMedia,
    *,
    add_to_filtered_index: bool = True,
    mature: bool = False,
) -> Hit:
    """
    Persist a media model to Elasticsearch.
    ``test.unit.conftest::cleanup_test_documents_elasticsearch`` is
    responsible for cleaning up documents created in tests.
    """
    es: Elasticsearch = settings.ES
    origin_index = media._meta.db_table
    source_document = cls._create_es_source_document(media, mature)
    es.create(
        index=origin_index,
        id=str(media.pk),
        document=source_document,
        refresh=True,
    )
    if add_to_filtered_index:
        es.create(
            index=f"{origin_index}-filtered",
            id=media.pk,
            document=source_document,
            refresh=True,
        )
    return Hit(
        {
            "_index": origin_index,
            "_score": 1.0,
            "_id": str(media.pk),
            "_source": source_document,
        }
    )