<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_options(ret=None):
    '''
    Get the appoptics options from salt.
    '''
    attrs = {
        'api_token': 'api_token',
        'api_url': 'api_url',
        'tags': 'tags',
        'sls_states': 'sls_states'
    }

    _options = salt.returners.get_returner_options(
        __virtualname__,
        ret,
        attrs,
        __salt__=__salt__,
        __opts__=__opts__)

    _options['api_url'] = _options.get('api_url', 'api.appoptics.com')
    _options['sls_states'] = _options.get('sls_states', [])
    _options['tags'] = _options.get('tags', {
        'host_hostname_alias': __salt__['grains.get']('id')
    })

    log.debug('Retrieved appoptics options: %s', _options)
    return _options