def from_name(cls, name: str) -> "User":
        """Gets an existing user from Argilla by its name.

        Args:
            name: the name of the user to be retrieved.

        Returns:
            A `User` instance.

        Raises:
            ValueError: if the user with the provided name doesn't exist.
            RuntimeError: if there was an error while retrieving the user.

        Examples:
            >>> from argilla_v1 import rg
            >>> user = rg.User.from_name("my-user")
        """
        client = cls.__active_client()
        try:
            users = users_api.list_users(client).parsed
            try:
                user = next(filter(lambda u: u.username == name, users))
            except StopIteration as e:
                raise ValueError(
                    f"User with username=`{name}` doesn't exist in Argilla, so please"
                    " make sure that the name you provided is a valid one."
                ) from e
            return cls.__new_instance(client, user)
        except NotFoundApiError as e:
            raise ValueError(
                f"User with username=`{name}` doesn't exist in Argilla, so please"
                " make sure that the name you provided is a valid one. Otherwise,"
                " you can create a new one via the `User.create` method."
            ) from e
        except BaseClientError as e:
            raise RuntimeError(f"Error while retrieving user with username=`{name}` from Argilla.") from e
Gets an existing user from Argilla by its name.

        Args:
            name: the name of the user to be retrieved.

        Returns:
            A `User` instance.

        Raises:
            ValueError: if the user with the provided name doesn't exist.
            RuntimeError: if there was an error while retrieving the user.

        Examples:
            >>> from argilla_v1 import rg
            >>> user = rg.User.from_name("my-user")
        
argilla-v1/src/argilla_v1/client/users.py