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

def _relative_to_abs_sls(relative, sls):
    '''
    Convert ``relative`` sls reference into absolute, relative to ``sls``.
    '''
    levels, suffix = re.match(r'^(\.+)(.*)$', relative).groups()
    level_count = len(levels)
    p_comps = sls.split('.')
    if level_count > len(p_comps):
        raise SaltRenderError(
            'Attempted relative include goes beyond top level package'
        )
    return '.'.join(p_comps[:-level_count] + [suffix])