code: def test_check_plot_args() -> None:
      study = create_study(directions=["minimize", "minimize"])
      with pytest.raises(ValueError):
          _check_plot_args(study, None, "Objective Value")
  
      with pytest.warns(UserWarning):
          _check_plot_args(
              study, lambda t: cast(float, t.value), "Objective Value"
          )
  
imports: import datetime
  import logging
  from textwrap import dedent
  from typing import cast
  import numpy
  import pytest
  from pytest import LogCaptureFixture
  import optuna
  from optuna.distributions import FloatDistribution
  from optuna.study import create_study
  from optuna.testing.visualization import prepare_study_with_trials
  from optuna.trial import create_trial
  from optuna.trial import FrozenTrial
  from optuna.trial import TrialState
  from optuna.visualization import is_available
  from optuna.visualization._utils import _check_plot_args
  from optuna.visualization._utils import _filter_nonfinite
  from optuna.visualization._utils import _is_log_scale
  from optuna.visualization._utils import _make_hovertext
label_desc: Use image node_id 4 for calling a global function with example usage: test_check_plot_args() without return types