def get_score(stats):
    """Compute score."""
    if 'statement' not in stats or stats['statement'] == 0:
        return None

    s = stats.get('statement')
    e = stats.get('error', 0)
    w = stats.get('warning', 0)
    r = stats.get('refactor', 0)
    c = stats.get('convention', 0)

    # https://docs.pylint.org/en/1.6.0/faq.html
    return 10 - 10*(5 * e + w + r + c) / s