def METHOD_NAME(targets, predictions):
    if metric_str == "matthews_corrcoef":
        metric_fn = matthews_corrcoef
    else:
        metric_fn = getattr(sklearn.metrics, metric_str)
    metric_val = metric_fn(targets, predictions, **metric_fn_kwargs)
    if metric_post_process_fn is not None:
        metric_val = metric_post_process_fn(metric_val)
    return {metric_dict_str or metric_str: metric_val}