def create(
        cls,
        username: str,
        password: str,
        *,
        first_name: Optional[str] = None,
        last_name: Optional[str] = None,
        role: Optional[UserRole] = None,
        workspaces: Optional[List[str]] = None,
    ) -> "User":
        """Creates a new user in Argilla.

        Args:
            username: the username of the user to be created.
            password: the password of the user to be created.
            first_name: the first name of the user to be created. Defaults to None.
            last_name: the last name of the user to be created. Defaults to None.
            role: the role of the user to be created. Defaults to None.
            workspaces: a list of workspace names the user to be created is linked to. Defaults to None.

        Returns:
            A new `User` instance.

        Raises:
            KeyError: if the user already exists in Argilla.
            ValueError: if the provided parameters are not valid.
            RuntimeError: if the user cannot be created in Argilla.

        Examples:
            >>> from argilla_v1 import rg
            >>> user = rg.User.create("my-user", "my-password", role="admin")
        """
        if not first_name:
            warnings.warn(
                "Since the `first_name` hasn't been provided, it will be set to the same value as the `username`."
            )
            first_name = username
        if not role:
            warnings.warn("Since the `role` hasn't been provided, it will be set to `annotator`.")
            role = UserRole.annotator

        client = cls.__active_client()
        try:
            user = users_api.create_user(
                client,
                username=username,
                password=password,
                first_name=first_name,
                last_name=last_name,
                role=role,
                workspaces=workspaces,
            ).parsed
            return cls.__new_instance(client, user)
        except AlreadyExistsApiError as e:
            raise KeyError(
                f"User with username=`{username}` already exists in Argilla, so please"
                " make sure that the name you provided is a unique one."
            ) from e
        except ValidationApiError as e:
            response = e.ctx["response"]
            raise ValueError(
                f"User with username=`{username}` cannot be created in Argilla, as"
                f" the provided data is not valid. Please, check the following error: {response}"
            ) from e
        except BaseClientError as e:
            raise RuntimeError(f"Error while creating user with username=`{username}` in Argilla.") from e
Creates a new user in Argilla.

        Args:
            username: the username of the user to be created.
            password: the password of the user to be created.
            first_name: the first name of the user to be created. Defaults to None.
            last_name: the last name of the user to be created. Defaults to None.
            role: the role of the user to be created. Defaults to None.
            workspaces: a list of workspace names the user to be created is linked to. Defaults to None.

        Returns:
            A new `User` instance.

        Raises:
            KeyError: if the user already exists in Argilla.
            ValueError: if the provided parameters are not valid.
            RuntimeError: if the user cannot be created in Argilla.

        Examples:
            >>> from argilla_v1 import rg
            >>> user = rg.User.create("my-user", "my-password", role="admin")
        
argilla-v1/src/argilla_v1/client/users.py