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

def w():  # pylint: disable=C0103
    '''
    Return a list of logged in users for this minion, using the w command

    CLI Example:

    .. code-block:: bash

        salt '*' status.w
    '''
    def linux_w():
        '''
        Linux specific implementation for w
        '''
        user_list = []
        users = __salt__['cmd.run']('w -fh').splitlines()
        for row in users:
            if not row:
                continue
            comps = row.split()
            rec = {'idle': comps[3],
                   'jcpu': comps[4],
                   'login': comps[2],
                   'pcpu': comps[5],
                   'tty': comps[1],
                   'user': comps[0],
                   'what': ' '.join(comps[6:])}
            user_list.append(rec)
        return user_list

    def bsd_w():
        '''
        Generic BSD implementation for w
        '''
        user_list = []
        users = __salt__['cmd.run']('w -h').splitlines()
        for row in users:
            if not row:
                continue
            comps = row.split()
            rec = {'from': comps[2],
                   'idle': comps[4],
                   'login': comps[3],
                   'tty': comps[1],
                   'user': comps[0],
                   'what': ' '.join(comps[5:])}
            user_list.append(rec)
        return user_list

    # dict that returns a function that does the right thing per platform
    get_version = {
        'Darwin': bsd_w,
        'FreeBSD': bsd_w,
        'Linux': linux_w,
        'OpenBSD': bsd_w,
    }

    errmsg = 'This method is unsupported on the current operating system!'
    return get_version.get(__grains__['kernel'], lambda: errmsg)()