def format_milestone_class(issue_data):
    """Return the correct class for a milestone, depending on state."""
    state = issue_data.get('state')
    milestone = issue_data.get('milestone')
    title = ''
    if state == 'closed':
        return 'closed'
    elif milestone:
        title = milestone.get('title')
    return title