def role_exists(role, **kwargs):
 return (len(tsql_query(query='sp_helprole "{0}"'.format(role), as_dict=True, **kwargs)) == 1)

def role_exists ( role , ** kwargs ) : return ( len ( tsql_query ( query = 'sp_helprole "{0}"' . format ( role ) , as_dict = True , ** kwargs ) ) == 1 )
checks if a role exists .