PALM CITY, Fla. — Yoenis Cespedes has just arrived at the first tee and already he has encountered a hazard.

“I need my cigarettes,” he said, as he patted himself down, hoping he remembered to stash a few smokes in his bright blue golf pants.

Cespedes is told that because children might be watching at home, the first nine holes of this junket will be smoke-free. Before stepping out of the cart to retrieve his driver, he shook his head.

“Ay yai yai!”

But he plays along, he always does. This is what the Mets have learned about their superstar slugger. No matter how loud or how bright, whether they’re self-created or not, he can shield himself from distractions.

Consider this round of golf, a made-for-television spectacle. After a light workout at camp, Cespedes drove away in his tricked-out Jeep for 18 holes with his agent Brodie Van Wagenen and Mets chief operating officer Jeff Wilpon. In tow for the front nine are two reporters, two photographers and an SNY camera crew recording his every move Wednesday at the swanky Floridian Golf Club that is owned by Jim Crane, who also owns the Astros. He bought it from H. Wayne Huizinga, who once owned the Marlins. The plush and secluded club has welcomed the likes of President Obama.

On Wednesday, it hosted a traveling circus, and Cespedes happily played his part. He shared a cart with Wilpon and made the friendly $5 wagers of a typical weekend foursome. But between the glad-handing and the photo ops, Cespedes was locked in, focused on a game that he has worked hard to learn.

It turns out, Cespedes the golfer isn’t much different from Cespedes the ballplayer.

“It’s stupid,” said pitching coach Dan Warthen, a regular playing partner. “It’s not fair that people have this kind of talent.”

An escape

Before there was the pig and the horses, before the Alfa Romeo, the Slingshot and the Lamborghini sent to get a round waffle maker for the clubhouse, there was golf.

Most position players refrain from playing the game during the summer for fear that it will hurt their baseball swings. Cespedes does not share in that belief, as evidenced during last year’s NLCS, when a Chicago television station caught him on the links.

“For me, it helps me with my [baseball] swing,” Cespedes said. “With golf, I have to keep my hands on the inside and you have to keep your eye on the ball. It’s exactly what I need to do when I’m playing baseball.”

That part may be debatable. But what’s not in question is what the game does for Cespedes. The course is his escape from the pressures of the season.

“It relaxes me,” he said. “It’s challenging. Every day I want to play better.”

That devotion could be seen Wednesday on the practice range, a place rife for the kind of flamboyance that peppers his game on a baseball field.

Warthen has seen Cespedes reach 360-yard par 4s with his tee shot. But as he warmed up to play, Cespedes left his driver in the bag, which also houses a set of Titleist irons and a $400 Bettinardi putter.

To practice, he took only a 3-wood and two wedges.

This wasn’t the home run derby at Citi Field. He wasn’t interested in putting on a show. His scores hover in the low 80s. The day before, he birdied three of his first four holes. He wants to be better. He came to play.

“He has all the shots,” said first base coach Tom Goodwin, another regular partner. “He can hook it around a tree, he can cut it if he needs to cut it. He’s got a really good short game too. He can putt. It’s very impressive.”

No lessons required

In 2014, Cespedes donated $40,000 to a Miami hospital that treats children with cancer. When he was informed that the donation came with a round of golf at a charity event, he bought a set of irons.

In Cuba, the closest course to his home was a 16-hour drive away. He’d never stepped foot on a fairway. But sheer athletic ability got him through that first round. Cespedes said he shot a 106, which he says is the only time he ever has failed to break 100. He was hooked.

Cespedes once went through sets of irons like he does sets of wheels. Just as he’s got a garage with cars, he’s got one stocked with golf clubs, too.

“Every time I see you, you’ve got a new driver,” Van Wagenen joked.

Cespedes is entirely self-taught. But what he missed in formal lessons he gained by scouring YouTube videos of swing breakdowns. On the range the next day, he simply would emulate what he had just seen.

“Watching until 2 a.m,” he said earlier, between drags of Marlboro reds.

He played often. In addition to a ranch in Vero Beach, he owns a home on a country club in Boca Raton. In the offseason, his afternoons belonged to golf, just he and the course going head-to-head. He takes what the game gives him and it shows.

His best skill is escaping from trouble.

“If I can hit out of the [stuff],” he said. “I’ll hit out of the [stuff].”

Going pro

On this bright 85-degree day at the Floridian, Cespedes is only one shot in and already, he’s in the stuff.

The scouting report on Cespedes is that at times, he sprays his driver all over. It proves accurate. The slight hook that showed up during his warmup has followed him to the first tee.

His drive soared to the right, then cut across the fairway to the left, saved from oblivion only by a stiff breeze and a well-placed palm tree. It landed in the rough and Cespedes punched it out, the smart play. He left himself with a 121-yard approach into a sloping green, a delicate shot, one that requires more mind than muscle.

This is difficult for Cespedes, who prefers to unleash full swings.

Nevertheless, he pulled a wedge and pressed the clubhead into the ball before catching turf. The ball cut through the wind and checked on a spot in the back of the green. It spun, just as he planned, back toward the hole. As it trickled down the hill, he shot a glance over at Wilpon.

“Sorry,” Cespedes said, though he wasn’t sorry.

Wilpon answered by chipping in for birdie.

“Sorry,” he said.

Cespedes chuckled, and on it went for eight more holes.

Repetition and practice has smoothed out Cespedes’ home-grown swing, though a few remnants remain. For example, he flares out his right elbow at the top of his backswing, almost forming a chicken wing at the top of his swing. But he’s athletic enough to make clean contact.

So, he gets away with it, for now.

By the fourth hole, he’s caught too much of the ground on a chip and not enough of the ground with a 7-iron. Each time, he takes practice swings, trying to feel where things went wrong.

On the fourth hole, he admits he’d love a smoke to relax. But he’s settled in. Cameras don’t bother Cespedes. And on this afternoon, he viewed the entourage as preparation for his next calling. In his mind, it was nothing more than a gallery on the PGA Tour.

“Once I’m done, I’m going to start taking lessons,” Cespedes said of his career after baseball. “I’m going to play professionally.”