def METHOD_NAME(self, parameter_type: ParameterType) -> None:
    if parameter_type.name is not None:
        if parameter_type.name in self.parameter_type_by_name:
            if not parameter_type.name:
                raise CucumberExpressionError(
                    "The anonymous parameter type has already been defined"
                )
            raise CucumberExpressionError(
                f"There is already a parameter with name {parameter_type.name}"
            )
        self.parameter_type_by_name[parameter_type.name] = parameter_type
    for parameter_type_regexp in parameter_type.regexps:
        if parameter_type_regexp not in self.parameter_types_by_regexp:
            self.parameter_types_by_regexp[parameter_type_regexp] = []
        parameter_types = self.parameter_types_by_regexp[parameter_type_regexp]
        if bool(
            parameter_types
            and parameter_types[0].prefer_for_regexp_match
            and parameter_type.prefer_for_regexp_match
        ):
            raise CucumberExpressionError(
                f"""
                There can only be one preferential parameter type per regexp.
                The regexp '{parameter_type_regexp}' is used for two preferential parameter types,
                {parameter_types[0].name} and {parameter_type.name}
                """
            )
        parameter_types.append(parameter_type)
        parameter_types.sort(key=functools.cmp_to_key(ParameterType.compare))
        self.parameter_types_by_regexp[parameter_type_regexp] = parameter_types