code: def test_check_user(
      mock_from_name,
      mock_create,
      input,
      exists,
      warning,
      is_user_obj,
      mock_user,
  ):
      if is_user_obj:
          user_input = mock_user
      else:
          user_input = input
          if exists:
              mock_from_name.return_value = mock_user
          else:
              mock_from_name.side_effect = ValueError
              mock_create.return_value = mock_user
  
      result = check_user(user_input)
  
      assert result is mock_user
  
      if not exists and not is_user_obj:
          mock_create.assert_called_with(
              username=input,
              first_name=input,
              password="12345678",
              role="annotator",
          )
      elif exists and not is_user_obj:
          mock_from_name.assert_called_with(input)
  
file_path: argilla/tests/unit/client/feedback/utils/test_assignment.py
imports: import warnings
  from unittest.mock import Mock, patch
  import pytest
  from argilla.client.feedback.utils.assignment import assign_records, assign_records_to_groups, assign_records_to_individuals, assign_workspaces, check_user, check_workspace
  from argilla.client.users import User
  from argilla.client.workspaces import Workspace
label_desc: Use image node_id 5 for calling a global function with example usage: test_check_user(mock_from_name, mock_create, input, exists, warning, is_user_obj, mock_user) without return types