code: def test_migrate_with_invalid_workspace(
      monkeypatch, sync_db: "Session", cli_runner: CliRunner, cli: Typer
  ):
      monkeypatch.setattr(
          settings,
          "users_db_file",
          os.path.join(
              os.path.dirname(__file__),
              "test_user_files",
              "users_invalid_workspace.yml",
          ),
      )
  
      result = cli_runner.invoke(cli, "database users migrate")
  
      assert result.exit_code == 1
      assert sync_db.query(User).count() == 0
      assert sync_db.query(Workspace).count() == 0
      assert sync_db.query(WorkspaceUser).count() == 0
  
file_path: argilla/tests/unit/server/cli/database/users/test_migrate.py
imports: import os
  from typing import TYPE_CHECKING
  from argilla.server.models import User, UserRole, Workspace, WorkspaceUser
  from argilla.server.security.auth_provider.db.settings import settings
  from click.testing import CliRunner
  from typer import Typer
label_desc: Use image node_id 4 for calling a global function with example usage: test_migrate_with_invalid_workspace(monkeypatch, sync_db, cli_runner, cli) without return types