def _relative_to_abs_sls(relative, sls):
 (levels, suffix) = re.match('^(\\.+)(.*)$', 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]))

def _relative_to_abs_sls ( relative , sls ) : ( levels , suffix ) = re . match ( '^(\\.+)(.*)$' , 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 ] ) )
convert relative sls reference into absolute .