def justify_content(tokens):
    """``justify-content`` property validation."""
    if len(tokens) == 1:
        keyword = get_keyword(tokens[0])
        if keyword in (
                'center', 'space-between', 'space-around', 'space-evenly',
                'stretch', 'normal', 'flex-start', 'flex-end',
                'start', 'end', 'left', 'right'):
            return (keyword,)
    elif len(tokens) == 2:
        keywords = tuple(get_keyword(token) for token in tokens)
        if keywords[0] in ('safe', 'unsafe'):
            if keywords[1] in (
                    'center', 'start', 'end', 'flex-start', 'flex-end', 'left',
                    'right'):
                return keywords
``justify-content`` property validation.
weasyprint/css/validation/properties.py