def create_scopes(vos, account_name=None):
    scope_uuid = str(generate_uuid()).lower()[:16]
    scope_name = ('shr_%s' % scope_uuid)
    created_scopes = []
    for vo in vos:
        scope = InternalScope(scope_name, vo=vo)
        add_scope(scope, InternalAccount((account_name if account_name else 'root'), vo=vo))
        created_scopes.append(scope)
    return (scope_name, created_scopes)
def create_scopes(vos, account_name=None):
    scope_uuid = str(generate_uuid()).lower()[:16]
    scope_name = ('shr_%s' % scope_uuid)
    created_scopes = []
    for vo in vos:
        scope = InternalScope(scope_name, vo=vo)
        add_scope(scope, InternalAccount((account_name if account_name else 'root'), vo=vo))
        created_scopes.append(scope)
    return (scope_name, created_scopes)