async def _get_tweet_engagements(
        self, tweet_id: str, count: int, cursor: str, f
    ) -> Result[User]:
        """
        Base function to get tweet engagements.
        type0: retweeters
        type1: favoriters
        """
        response, _ = await f(tweet_id, count, cursor)
        items_ = find_dict(response, 'entries', True)
        if not items_:
            return Result([])
        items = items_[0]
        next_cursor = items[-1]['content']['value']
        previous_cursor = items[-2]['content']['value']

        results = []
        for item in items:
            if not item['entryId'].startswith('user'):
                continue
            user_info_ = find_dict(item, 'result', True)
            if not user_info_:
                continue
            user_info = user_info_[0]
            results.append(User(self, user_info))

        return Result(
            results,
            partial(self._get_tweet_engagements, tweet_id, count, next_cursor, f),
            next_cursor,
            partial(self._get_tweet_engagements, tweet_id, count, previous_cursor, f),
            previous_cursor
        )

        Base function to get tweet engagements.
        type0: retweeters
        type1: favoriters
        
twikit/client/client.py