def METHOD_NAME(in_shape, minimum, maximum, op_version, value_format):
    inputs = []
    outputs = []
    initializers = []
    nodes = []
    attributes_dict = {}
    input = helper.make_tensor_value_info('input', TensorProto.FLOAT, in_shape)
    inputs.append('input')
    output = helper.make_tensor_value_info('output', TensorProto.FLOAT, in_shape)
    outputs.append('output')
    # opset 1/6
    if op_version == 1 or op_version == 6:
        if minimum is not None:
            attributes_dict['min'] = minimum
        if maximum is not None:
            attributes_dict['max'] = maximum
    else:
        # opset 11/12/13
        if minimum is not None:
            mins = []
            mins.append(minimum)
            min_tensor = helper.make_tensor(
                'min',
                TensorProto.FLOAT,
                dims=[1],
                vals=mins
            )
            if value_format == 'initializer':
                initializers.append(min_tensor)
            else:
                min_node = helper.make_node(
                    'Constant',
                    inputs=[],
                    outputs=['min'],
                    value=min_tensor)
                nodes.append(min_node)
            inputs.append('min')
        if maximum is not None:
            maxes = []
            maxes.append(maximum)
            max_tensor = helper.make_tensor(
                'max',
                TensorProto.FLOAT,
                dims=[1],
                vals=maxes
            )
            if value_format == 'initializer':
                initializers.append(max_tensor)
            else:
                max_node = helper.make_node(
                    'Constant',
                    inputs=[],
                    outputs=['max'],
                    value=max_tensor)
                nodes.append(max_node)
            inputs.append('max')
    clip = onnx.helper.make_node(
        'Clip',
        inputs=inputs,
        outputs=outputs,
        **attributes_dict
    )
    nodes.append(clip)
    graph_def = helper.make_graph(
        nodes,
        'test-model',
        [input],
        [output],
        initializer=initializers)
    op = onnx.OperatorSetIdProto()
    op.version = op_version
    model_def = helper.make_model(graph_def, producer_name='kendryte', opset_imports=[op])
    return model_def