code: def test_wfg_2d() -> None:
      for n in range(2, 30):
          r = n * np.ones(2)
          s = np.asarray([[n - 1 - i, i] for i in range(n)])
          for i in range(n + 1):
              s = np.vstack((s, np.asarray([i, n - i])))
          np.random.shuffle(s)
          v = optuna._hypervolume.WFG().compute(s, r)
          assert v == n * n - n * (n - 1) // 2
  
file_path: optuna/tests/hypervolume_tests/test_wfg.py
imports: import numpy
  import pytest
  import optuna
label_desc: Use image node_id 1 for calling a global function with example usage: test_wfg_2d() without return types