def lpush(self, key, *args):
        """Emulate lpush."""
        redis_list = self._get_list(key, 'LPUSH', create=True)

        # Creates the list at this key if it doesn't exist, and appends args to its beginning
        args_reversed = [self._encode(arg) for arg in args]
        args_reversed.reverse()
        updated_list = args_reversed + redis_list
        self.redis[self._encode(key)] = updated_list

        # Return the length of the list after the push operation
        return len(updated_list)
Emulate lpush.