def validate_padding(value):
    """Validates and format padding value

    Args:
        value: `str` padding value to validate.

    Returns:
        formatted value.

    Raises:
        ValueError: if is not valid.
    """
    padding = value.upper()
    if padding not in ['SAME', 'VALID']:
        raise ValueError('Padding value `{}` is not supported, '
                         'expects `SAME`\`VALID`'.format(value))
    return padding