code: def test_migrate_with_one_user_file(
      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_one.yml",
          ),
      )
  
      result = cli_runner.invoke(cli, "database users migrate")
  
      assert result.exit_code == 0
      assert sync_db.query(User).count() == 1
      assert sync_db.query(Workspace).count() == 3
      assert sync_db.query(WorkspaceUser).count() == 3
  
      user = sync_db.query(User).filter_by(username="john").first()
      assert user.first_name == "John Doe"
      assert user.username == "john"
      assert user.role == UserRole.annotator
      assert user.api_key == "a14427ea-9197-11ec-b909-0242ac120002"
      assert (
          user.password_hash
          == "$2y$05$xtl7iy3bpqchUwiQMjEHe.tY7OaIjDrg43W3TB4EHQ7izvdjvGtPS"
      )
      assert [ws.name for ws in user.workspaces] == [
          "john",
          "argilla",
          "team",
      ]
  
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 2 for calling a global function with example usage: test_migrate_with_one_user_file(monkeypatch, sync_db, cli_runner, cli) without return types