code: def test_num_losses_error(losses: tp.Tuple[tp.Any, tp.Any]) -> None:
      opt = ng.optimizers.CMA(parametrization=3, budget=100)
      cand = opt.ask()
      opt.tell(cand, losses[0])
      cand = opt.ask()
      with pytest.raises(ValueError):
          opt.tell(cand, losses[1])
  
file_path: nevergrad/nevergrad/optimization/multiobjective/test_core.py
imports: import warnings
  from unittest import SkipTest
  import numpy
  import pytest
  import nevergrad.common.typing
  import nevergrad
  from ..None import base
  from ..optimizerlib import registry
  from .None import core
label_desc: Use image node_id 3 for calling a global function with example usage: test_num_losses_error(losses) without return types