async def get_user_by_id(self, user_id: str) -> User:
        """
        Retrieves a user object based on the provided user ID.

        Parameters
        ----------
        user_id : :class:`str`
            The ID of the user to retrieve.

        Returns
        -------
        :class:`.user.User`
            An instance of the `User` class

        Examples
        --------
        >>> user = await client.get_user_by_id('123456789')
        >>> print(user)
        <User id="123456789">
        """
        response, _ = await self.gql.user_by_rest_id(user_id)
        return User(self, response['data']['user']['result'])

        Retrieves a user object based on the provided user ID.

        Parameters
        ----------
        user_id : :class:`str`
            The ID of the user to retrieve.

        Returns
        -------
        :class:`.user.User`
            An instance of the `User` class

        Examples
        --------
        >>> user = await client.get_user_by_id('123456789')
        >>> print(user)
        <User id="123456789">
        
twikit/guest/client.py