def METHOD_NAME(client):
    """Wipes a cluster clean between test cases"""
    close_after_wipe = False
    try:
        # If client is async we need to replace the client
        # with a synchronous one.
        from opensearchpy import AsyncOpenSearch
        if isinstance(client, AsyncOpenSearch):
            client = OpenSearch(client.transport.hosts, verify_certs=False)
            close_after_wipe = True
    except ImportError:
        pass
    wipe_snapshots(client)
    wipe_indices(client)
    client.indices.delete_template(name="*")
    client.indices.delete_index_template(name="*")
    client.cluster.delete_component_template(name="*")
    wipe_cluster_settings(client)
    wait_for_cluster_state_updates_to_finish(client)
    if close_after_wipe:
        client.close()