def validate_fillna_kwargs(value, method, validate_scalar_dict_value=True):
from pandas.core.missing import clean_fill_method<EOL>if value is None and method is None:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>elif value is None and method is not None:<EOL><INDENT>method = clean_fill_method(method)<EOL><DEDENT>elif value is not None and method is None:<EOL><INDENT>if validate_scalar_dict_value and isinstance(value, (list, tuple)):<EOL><INDENT>raise TypeError('<STR_LIT>'<EOL>'<STR_LIT>'.format(type(value).__name__))<EOL><DEDENT><DEDENT>elif value is not None and method is not None:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>return value, method<EOL>
Validate the keyword arguments to 'fillna'.

    This checks that exactly one of 'value' and 'method' is specified.
    If 'method' is specified, this validates that it's a valid method.

    Parameters
    ----------
    value, method : object
        The 'value' and 'method' keyword arguments for 'fillna'.
    validate_scalar_dict_value : bool, default True
        Whether to validate that 'value' is a scalar or dict. Specifically,
        validate that it is not a list or tuple.

    Returns
    -------
    value, method : object