def METHOD_NAME(model):
    metric.reset()
    session = ort.InferenceSession(model.SerializeToString(), 
                                   providers=ort.get_available_providers())
    ort_inputs = {}
    len_inputs = len(session.get_inputs())
    inputs_names = [session.get_inputs()[i].name for i in range(len_inputs)]
    for idx, (inputs, labels) in enumerate(dataloader):
        if not isinstance(labels, list):
            labels = [labels]
        if len_inputs == 1:
            ort_inputs.update(
                inputs if isinstance(inputs, dict) else {inputs_names[0]: inputs}
            )
        else:
            assert len_inputs == len(inputs), 'number of input tensors must align with graph inputs'
            if isinstance(inputs, dict):
                ort_inputs.update(inputs)
            else:
                for i in range(len_inputs):
                    if not isinstance(inputs[i], np.ndarray):
                        ort_inputs.update({inputs_names[i]: np.array(inputs[i])})
                    else:
                        ort_inputs.update({inputs_names[i]: inputs[i]})
        predictions = session.run(None, ort_inputs)
        predictions, labels = postprocess((predictions, labels))
        metric.update(predictions, labels)
    return metric.result()