def METHOD_NAME(parameters):
    """Sort an iterable of :class:`.Parameter` instances into a canonical order, respecting the
    ordering relationships between elements of :class:`.ParameterVector`\\ s."""
    def key(parameter):
        if isinstance(parameter, ParameterVectorElement):
            return (parameter.vector.name, parameter.index)
        return (parameter.name,)
    return sorted(parameters, key=key)