Before he goes, Kobe Bryant is saying his own farewell to the NBA’s next generation of stars, maybe just to assure he’s leaving the league in good hands.

Bryant did so in Los Angeles last week when he played the Timberwolves — and dueled with young Andrew Wiggins down the stretch — for the final time before he retires at season’s end.

Bryant’s 38 points in the Lakers’ 119-115 victory were reminders of the player he once was and still is, some nights when he’s feeling right at age 37. Wiggins’ 30-point performance — and in particular a fadeaway shot he hit over Bryant late in the game — foreshadowed the player he will become.

“I think it’s fantastic,” Bryant said afterward, referring to a young player arriving on the big stage as he is leaving.

Born the year before Bryant entered the NBA in 1996, Wiggins backed the future Hall of Famer down from the left wing and then hit over him what Wiggins called a “half-spin fade” that caused each player to smile at each other and exchange remarks after they had run to the court’s other end.

“He said it looked familiar,” Wiggins said, “and I said, ‘I got it from you.’ ”

Now in his 20th NBA season, Bryant said he knows everything his contemporaries — well, those dwindling few who still remain — can do and vice versa. He used Wednesday’s final game against the Wolves to discover what he’ll miss when he’s gone.

“The young guys, I just test them out,” Bryant said. “I wanted to see now if he had developed that shot, which he did. It’s fun to be able to see how much game he added.”

That half-spin fade illustrated as much.

“His first year in the league, he was off-balance with it, exposing the ball too much,” Bryant said. “Now that one, it was textbook. Textbook: Hid the ball well, elevated well, faded well. I was impressed.”

Bryant wanted to see if Wiggins had a counter to that move, but with little more than two minutes left in the game and in his career against the Wolves, he never got the chance.

“Next time, if we were caught in the post, I would have tried to force him to the right shoulder, see if he had developed the technique on that one. It’s a joy to watch their growth. He’s improved a lot since I first played him.”

Bryant remembers when he did the same — only in reverse — against a guy named Michael Jordan 20 years ago. Jordan tested Bryant back then to see just what he was made from, just as Bryant did now with Wiggins for the last time.

“Absolutely,“ Bryant said. “When I played against him, I tried to feed it back to him. Wiggins did the same thing on that post move, and it was a joy to see.”

Wolves interim coach Sam Mitchell said such a subplot in Wednesday’s game is best left to “NBA TV and the bloggers” because all he cares about is the final score, which didn’t turn in the Wolves’ favor.

Wiggins, though, said he considered it valuable experience dueling Bryant at a shooting guard matchup in moments he will never get again.

“Definitely,” Wiggins said. “The way he approaches everything, talking to him, taking what he knows, you’re talking to greatness.”