code: def test_collapsed_ellipsis_errors_out():
      x = numpy.zeros([1, 1, 1, 1, 1])
      rearrange(x, "a b c d ... ->  a b c ... d")
      with pytest.raises(EinopsError):
          rearrange(x, "a b c d (...) ->  a b c ... d")
  
      rearrange(x, "... ->  (...)")
      with pytest.raises(EinopsError):
          rearrange(x, "(...) -> (...)")
  
imports: import itertools
  import numpy
  import pytest
  from einops import EinopsError
  from einops.einops import rearrange, reduce, repeat, _enumerate_directions
  from .None import collect_test_backends, is_backend_tested, FLOAT_REDUCTIONS
label_desc: Use image node_id 1 for calling a global function with example usage: test_collapsed_ellipsis_errors_out() without return types