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

def get_slack_channels(self, token):
        '''
        Get all channel names from Slack
        '''

        ret = salt.utils.slack.query(
            function='rooms',
            api_key=token,
            # These won't be honored until https://github.com/saltstack/salt/pull/41187/files is merged
            opts={
                'exclude_archived': True,
                'exclude_members': True
            })
        channels = {}
        if 'message' in ret:
            for item in ret['message']:
                channels[item['id']] = item['name']
        return channels