<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def validate(config):
    '''
    Validate the beacon configuration.
    '''
    # Must be a list of dicts.
    if not isinstance(config, list):
        return False, 'Configuration for napalm beacon must be a list.'
    for mod in config:
        fun = mod.keys()[0]
        fun_cfg = mod.values()[0]
        if not isinstance(fun_cfg, dict):
            return False, 'The match structure for the {} execution function output must be a dictionary'.format(fun)
        if fun not in __salt__:
            return False, 'Execution function {} is not availabe!'.format(fun)
    return True, 'Valid configuration for the napal beacon!'