code: def test_multiobjective_values_registered_on_epoch(
      wandb: mock.MagicMock,
      metrics: Union[str, Sequence[str]],
      as_multirun: bool,
      expected: List[str],
  ) -> None:
      def assert_call_args(
          log_func: mock.MagicMock, as_multirun: bool
      ) -> None:
          call_args = log_func.call_args
          assert list(call_args[0][0].keys()) == expected
          assert call_args[1] == {"step": None if as_multirun else 0}
  
      wandb.sdk.wandb_run.Run = mock.MagicMock
  
      if as_multirun:
          wandb.run = None
          log_func = wandb.init().log
      else:
          log_func = wandb.run.log
  
      study = optuna.create_study(directions=["minimize", "maximize"])
      wandbc = WeightsAndBiasesCallback(
          metric_name=metrics, as_multirun=as_multirun
      )
  
      study.optimize(
          _multiobjective_func, n_trials=1, callbacks=[wandbc]
      )
      assert_call_args(log_func, as_multirun)
  
imports: from typing import Any
  from typing import Dict
  from typing import List
  from typing import Sequence
  from typing import Tuple
  from typing import Union
  from unittest import mock
  import pytest
  import optuna
  from optuna.integration import WeightsAndBiasesCallback
label_desc: Use image node_id 9 for calling a global function with example usage: test_multiobjective_values_registered_on_epoch(wandb, metrics, as_multirun, expected) without return types