Examines a model specification and determines if it can compute results for more than one output shape.

    :param spec: MLModel
        The protobuf specification of the model.

    :return: Bool
        Returns True if the model can allow multiple input shapes, False otherwise.

def can_allow_multiple_input_shapes(spec):
    """
    Examines a model specification and determines if it can compute results for more than one output shape.

    :param spec: MLModel
        The protobuf specification of the model.

    :return: Bool
        Returns True if the model can allow multiple input shapes, False otherwise.
    """

    # First, check that the model actually has a neural network in it
    try:
        layers = _get_nn_layers(spec)
    except:
        raise Exception('Unable to verify that this model contains a neural network.')

    try:
        shaper = NeuralNetworkShaper(spec, False)
    except:
        raise Exception('Unable to compute shapes for this neural network.')

    inputs = _get_input_names(spec)

    for name in inputs:

        shape_dict = shaper.shape(name)
        shape = NeuralNetworkMultiArrayShapeRange(shape_dict)

        if (shape.isFlexible()):
            return True

    return False