def _check_params(params, error_callback):
    """Predicate function returning bool depending on conditions.

    List of conditions:
        - `host` and `key` must be specified in params,
        - `dc` or `env` must be specified in params,
        - `sections` must be specified in params.

    Returns:
        bool: True if all conditions are met, False otherwise
    """
    required_params = {'host', 'key'}
    diff = required_params - {k for k, v in params.items() if v}
    if diff:
        error_callback('ERROR: {} are required.'.format(
            ', '.join(['--{}'.format(d) for d in diff]))
        )
        return False

    dc = params.get('dc')
    net_env = params.get('net_env')
    if (dc and net_env) or (not dc and not net_env):
        error_callback(
            'ERROR: Only DC or ENV mode available.',
        )
        return False
    sections = params.get('sections')
    if not sections:
        error_callback(
            'ERROR: option `sections` are required.',
        )
        return False
    return True