def METHOD_NAME():
    metric_id = request.args.get("id")
    if not metric_id:
        abort(jsonify(status=400, message="id parameter required"))
    METHOD_NAME = report_util.get_metric(metric_id)
    # A metric has a histogram if it is not explicitly disabled.
    has_histogram = METHOD_NAME and METHOD_NAME.get("histogram", {}).get("enabled", True)
    latest = (
        report_util.get_latest_date(metric_id) if METHOD_NAME and has_histogram else None
    )
    return jsonify(status=200, METHOD_NAME=METHOD_NAME, latest=latest)