code: def test_parse_pattern_number_of_arrows(self) -> None:
      axes_lengths: Dict[str, int] = {}
  
      too_many_arrows_pattern = "a -> b -> c -> d"
      with self.assertRaises(ValueError):
          parse_pattern(too_many_arrows_pattern, axes_lengths)
  
      too_few_arrows_pattern = "a"
      with self.assertRaises(ValueError):
          parse_pattern(too_few_arrows_pattern, axes_lengths)
  
      just_right_arrows = "a -> a"
      parse_pattern(just_right_arrows, 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 1 for calling the TestParsingUtils obj's underlying member method code with example usage: obj.test_parse_pattern_number_of_arrows() without return types