code: def test_length_names():
      """Tests the length of `names` parameter is two"""
      data = pd.DataFrame(
          data={"id": ["a", "b"], "objective": [0.1, 0.2]}
      )
  
      with pytest.raises(ValueError) as exception:
          regret(data, names=())
      assert (
          "`names` requires a tuple with 2 elements. 0 provided."
          in str(exception.value)
      )
  
      with pytest.raises(ValueError) as exception:
          regret(data, names=("a", "b", "c"))
      assert (
          "`names` requires a tuple with 2 elements. 3 provided."
          in str(exception.value)
      )
  
file_path: orion/tests/unittests/analysis/test_regret.py
imports: import pandas
  import pytest
  from orion.analysis import regret
label_desc: Use image node_id 4 for calling a global function with example usage: test_length_names() without return types