code: def _user_role(self, user: dict) -> UserRole:
      if user.get("workspaces") is None:
          return UserRole.owner
  
      return UserRole.annotator
  
file_path: argilla/src/argilla/server/cli/database/users/migrate.py
imports: import asyncio
  from typing import TYPE_CHECKING, List, Optional
  import typer
  import yaml
  from argilla.pydantic_v1 import BaseModel, Field, constr
  from argilla.server.database import AsyncSessionLocal
  from argilla.server.models import User, UserRole
  from argilla.server.security.auth_provider.db.settings import settings
  from argilla.server.security.model import USER_USERNAME_REGEX, WORKSPACE_NAME_REGEX
  from .utils import get_or_new_workspace
label_desc: Use image node_id 3 for calling the UsersMigrator obj's underlying member method code with example usage: obj._user_role(user) and returns: UserRole, UserRole