def validate_settings(**kwargs):
    """Validate settings from configuration file

    Arguments:
        **kwargs -- settings read from config file or their defaults from .get
    
    Returns:
        dict -- validated settings
    """
    # check if block_size is odd
    if kwargs['block_size'] % 2 == 0:
        print(f"ERROR: Invalid Block_Size '{kwargs['block_size']}' -- must be odd integer, check your config file")
        print("Setting Block_Size to 251")
        kwargs['block_size'] = 251

    if kwargs['method'] not in ('mean', 'median', 'gaussian'):
        print(f"ERROR: Invalid Method '{kwargs['method']}' -- must be one of 'mean', 'median', or 'gaussian', check your config file")
        print("Setting Method to 'mean'")
        kwargs['method'] = 'mean'

    return kwargs