def _get_role_name_from_file(path):
 dirs = path.parts
 return dirs[(dirs.index('roles') + 1)]

def _get_role_name_from_file ( path ) : dirs = path . parts return dirs [ ( dirs . index ( 'roles' ) + 1 ) ]
gets name of role from the filepath .