def METHOD_NAME(expected_histogram_bucket, candidate_histogram_bucket):
    # Tuple of (score, weight)
    scores = [(_is_similar_text_score(expected_histogram_bucket.name, candidate_histogram_bucket.name), 3)]
    if expected_histogram_bucket.value is not None:
        score = 1 if expected_histogram_bucket.value == candidate_histogram_bucket.value else 0
        scores.append((score, 1))
    if expected_histogram_bucket.lower_bound is not None:
        score = 1 if expected_histogram_bucket.lower_bound == candidate_histogram_bucket.lower_bound else 0
        scores.append((score, 1))
    if expected_histogram_bucket.upper_bound is not None:
        score = 1 if expected_histogram_bucket.upper_bound == candidate_histogram_bucket.upper_bound else 0
        scores.append((score, 1))
    if expected_histogram_bucket.monotonic is not None:
        score = 1 if expected_histogram_bucket.monotonic == candidate_histogram_bucket.monotonic else 0
        scores.append((score, 1))
    if expected_histogram_bucket.tags is not None:
        score = _is_similar_text_score(
            str(sorted(expected_histogram_bucket.tags)), str(sorted(candidate_histogram_bucket.tags))
        )
        scores.append((score, 1))
    if expected_histogram_bucket.hostname:
        score = _is_similar_text_score(expected_histogram_bucket.hostname, candidate_histogram_bucket.hostname)
        scores.append((score, 1))
    return _compute_score(scores)