def METHOD_NAME(all_predictions, all_labels, args):
    for d in all_predictions:
        all_predictions[d] = all_predictions[d] / len(args.paths)
    if args.calc_threshold:
        args.threshold = get_threshold(all_predictions, all_labels, args.one_threshold)
        print('threshold', args.threshold)
    if args.threshold is not None:
        all_predictions = threshold_predictions(all_predictions, args.threshold)
    return all_predictions, all_labels