code: def test_ellipsis_matching(self) -> None:
      axes_lengths: Dict[str, int] = {}
  
      pattern = "a -> a ..."
      with self.assertRaises(ValueError):
          parse_pattern(pattern, axes_lengths)
  
      # raising an error on this pattern is handled by the rearrange expression validation
      pattern = "a ... -> a"
      parse_pattern(pattern, axes_lengths)
  
      pattern = "a ... -> ... a"
      parse_pattern(pattern, axes_lengths)
  
imports: from typing import Any, Callable, Dict
  from unittest import mock
  from functorch.einops._parsing import AnonymousAxis, ParsedExpression, parse_pattern, validate_rearrange_expressions, _ellipsis
  from torch.testing._internal.common_utils import TestCase, run_tests
label_desc: Use image node_id 3 for calling the TestParsingUtils obj's underlying member method code with example usage: obj.test_ellipsis_matching() without return types