code: def test_split(
      permutation: Iterable[float],
      dimensions: List[int],
      overlap: int,
      expected: Union[Type[Exception], List[np.ndarray]],
  ) -> None:
      perm = np.array(list(permutation))
      if isinstance(expected, list):
          output = _core.split(perm, dimensions, overlap)
          np.testing.assert_equal(output, expected)
      else:
          with pytest.raises(
              expected if not isinstance(expected, list) else None
          ):
              _core.split(perm, dimensions, overlap)
  
file_path: nevergrad/nevergrad/functions/lsgo/test_core.py
imports: from typing import Callable, Optional, List, Iterable, Type, Union
  import numpy
  import pytest
  from nevergrad.common import testing
  from .None import _core
label_desc: Use image node_id 3 for calling a global function with example usage: test_split(permutation, dimensions, overlap, expected) without return types