class_docstr: Calls to :meth:`orion.core.io.database.AbstractDB.ensure_index`.
docstr: Tuple of Index should be added as a compound index.
docstr_tok: ["Tuple","of","Index","should","be","added","as","a","compound","index","."]
code: def test_compound_index(self, orion_db):
      """Tuple of Index should be added as a compound index."""
      assert (
          "name_1_metadata.user_1"
          not in get_db(orion_db)["experiments"].index_information()
      )
      orion_db.ensure_index(
          "experiments",
          [
              ("name", Database.ASCENDING),
              ("metadata.user", Database.ASCENDING),
          ],
          unique=True,
      )
      assert (
          "name_1_metadata.user_1"
          in get_db(orion_db)["experiments"].index_information()
      )
  
imports: import pickle
  from datetime import datetime
  import pytest
  from orion.core.io.database import Database, DatabaseError, DuplicateKeyError
  from orion.core.io.database.ephemeraldb import EphemeralDB
  from orion.core.io.database.mongodb import MongoDB
  from orion.core.io.database.pickleddb import PickledDB
  from .conftest import insert_test_collection
label_desc: Use image node_id 4 for calling the TestEnsureIndex obj's underlying member method code with example usage: obj.test_compound_index(orion_db) without return types