def _pick_counters(log_interpretation):
    """Pick counters from a dictionary possibly containing
    step and history interpretations."""
    for log_type in 'step', 'history':
        counters = log_interpretation.get(log_type, {}).get('counters')
        if counters:
            return counters
    else:
        return {}