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

def beacon(config):
    '''
    Checks for locked accounts due to too many invalid login attempts, 3 or higher.

    .. code-block:: yaml

        beacons:
          aix_account:
            user: ALL
            interval: 120

    '''

    ret = []

    user = config['user']

    locked_accounts = __salt__['shadow.login_failures'](user)
    ret.append({'accounts': locked_accounts})

    return ret