code: def _hypothesis_parse_gufunc_signature(signature):
      # Disable all_checks to better match the Numpy version, for testing
      if not re.match(_SIGNATURE, signature):
          if re.match(_SIGNATURE_MULTIPLE_OUTPUT, signature):
              raise InvalidArgument(
                  "Hypothesis does not yet support generalised ufunc signatures "
                  "with multiple output arrays - mostly because we don't know of "
                  "anyone who uses them!  Please get in touch with us to fix that."
                  f"\n ({signature=})"
              )
          if re.match(
              (
                  # Taken from np.lib.function_base._SIGNATURE
                  r"^\((?:\w+(?:,\w+)*)?\)(?:,\((?:\w+(?:,\w+)*)?\))*->"
                  r"\((?:\w+(?:,\w+)*)?\)(?:,\((?:\w+(?:,\w+)*)?\))*$"
              ),
              signature,
          ):
              raise InvalidArgument(
                  f"{signature=} matches Numpy's regex for gufunc signatures, "
                  f"but contains shapes with more than {NDIM_MAX} dimensions and is thus invalid."
              )
          raise InvalidArgument(
              f"{signature!r} is not a valid gufunc signature"
          )
      input_shapes, output_shapes = (
          tuple(
              tuple(re.findall(_DIMENSION, a))
              for a in re.findall(_SHAPE, arg_list)
          )
          for arg_list in signature.split("->")
      )
      assert len(output_shapes) == 1
      result_shape = output_shapes[0]
      # Check that there are no names in output shape that do not appear in inputs.
      # (kept out of parser function for easier generation of test values)
      # We also disallow frozen optional dimensions - this is ambiguous as there is
      # no way to share an un-named dimension between shapes.  Maybe just padding?
      # Anyway, we disallow it pending clarification from upstream.
      for shape in (*input_shapes, result_shape):
          for name in shape:
              try:
                  int(name.strip("?"))
                  if "?" in name:
                      raise InvalidArgument(
                          f"Got dimension {name!r}, but handling of frozen optional dimensions "
                          "is ambiguous.  If you known how this should work, please "
                          "contact us to get this fixed and documented ({signature=})."
                      )
              except ValueError:
                  names_in = {
                      n.strip("?") for shp in input_shapes for n in shp
                  }
                  names_out = {n.strip("?") for n in result_shape}
                  if name.strip("?") in (names_out - names_in):
                      raise InvalidArgument(
                          "The {name!r} dimension only appears in the output shape, and is "
                          "not frozen, so the size is not determined ({signature=})."
                      ) from None
      return _GUfuncSig(
          input_shapes=input_shapes, result_shape=result_shape
      )
  
imports: import re
  from typing import NamedTuple, Optional, Tuple, Union
  from hypothesis import assume, strategies
  from hypothesis.errors import InvalidArgument
  from hypothesis.internal.conjecture.utils import _calc_p_continue
  from hypothesis.internal.coverage import check_function
  from hypothesis.internal.validation import check_type, check_valid_interval
  from hypothesis.strategies._internal.utils import defines_strategy
  from hypothesis.utils.conventions import UniqueIdentifier, not_set
label_desc: Use image node_id 7 for calling a global function with example usage: _hypothesis_parse_gufunc_signature(signature) and returns: _GUfuncSig