CLEVELAND, Ohio -- A Euclid police officer was justified in shooting an unarmed man in March 2017 during a struggle while the man was erratically driving with the officer in the passenger's seat, a judge ruled Friday.

However, U.S. District Judge James Gwin made clear his disgust with the training protocol Euclid police officials use to train officers on using force. This included a slideshow and a Chris Rock comedy video that exhibited a lackadaisical attitude about the subject, the judge wrote.

Gwin wrote that officer Matthew Rhodes did not violate the rights of Luke Stewart when he shot the 23-year-old following a call about a suspicious vehicle on South Lake Shore.

The judge dismissed the lawsuit, filed in August by Stewart's family against the city, Rhodes and officer Louis Catalani.

Stewart was asleep in the car and Catalani, who was the first to respond to the call, saw a half-smoked joint of marijuana and the top of a wine bottle in the car, authorities say. A confrontation ensued and as Stewart drove away Rhodes jumped into the car, punched Stewart, used a Taser on him and finally pulled his pistol and fired several shots that killed Stewart, investigators said.

A Cuyahoga County grand jury in August declined to issue charges against Rhodes. Rhodes told BCI investigators that Stewart fought back and he feared he may be killed in a car crash if he didn't shoot Stewart, who left behind two children.

Gwin wrote that it was a "close and difficult question" when ruling whether Rhodes used unconstitutionally excessive force against Stewart. Ultimately, the judge said he was required to look at all the circumstances at the moment the officer decided to fire his weapon.

While in the car, Stewart drove off the roadway twice, Gwin wrote. While Stewart wasn't driving fast, that was likely because he and Rhodes were struggling over the car's gearshift.

Rhodes also had to consider that all this happened on a residential street when people were heading to work, Gwin wrote.

When Rhodes shot Stewart, Stewart was trying to accelerate, even though the car was in neutral. Before firing, the officer also tried to stop the car by reaching for the gearshift and ignition and by striking Stewart and using his Taser. None of this worked, Gwin's opinion says.

Gwin said Rhodes admittedly did not use every possible means to stop the car - i.e. pulling the emergency brake, using pepper spray or the drive-stun feature on his Taser.

"But the ultimate question is not whether the officer exhausted every possible alternative before resorting to deadly force," Gwin wrote. "It is whether there was probable cause to believe that deadly force was necessary to avoid a serious risk to the officer or others. And in this case, the Court is not persuaded that there were viable alternatives to the use of deadly force."

Gwin also wrote that Rhodes and Catalani's attempts to remove Stewart from the car did not violate Stewart's constitutional rights, as they saw the marijuana, which was evidence that a potential crime had occurred.

Jacqueline Greene and Sarah Gelsomino, attorneys for Stewart's family, said Friday that they will appeal Gwin's ruling. They also said Stewart's death was preventable.

"Counsel for the Stewart family are disturbed by the determination that no jury will hear or decide this case, and that courts' approaches to police shootings are becoming increasingly deferential to police -- and discounting facts that should require juries to decide whether or not police violated constitutional rights," they said in a statement.

In addition to clearing the officers of any liability for the lawsuit, the judge also ruled against Stewart's family in a claim that said the city has a pattern and practice of unconstitutional actions when it comes to using force against black people and disciplining officers for misconduct.

Such a charge is difficult to prove in court, though Euclid officers have come under scrutiny in the past year after another officer was seen on a viral video hitting a driver during a traffic stop.

Gwin had some problems, though, with the materials presented to him on how the city of Euclid trains its police officers on using force.

"Of particular concern is the City's blase attitude toward excessive force training," Gwin wrote. "Other than whatever basics are taught to officers when they attend a police academy, the City's training seems to consist initially of simply reading the excessive force policy after advising officers to 'pay attention.'"

The city follows it up with a simple test that only runs through one type of scenario officers may face, Gwin wrote.

The presentation materials also leave a lot to be desired, according to Gwin.

"For instance, one slide contains the following graphic showing an officer beating a prone and unarmed suspect with the caption '[p]rotecting and serving the poop out of you,'" Gwin wrote.

During training, training officers also show a video done by the comedian Chris Rock called "How not to get you're a-- kicked by the police!", Gwin wrote.

"Whatever the merits of this routine as comedy, it is grossly inappropriate in the context of a police department's use of force training," the opinion states.

Euclid's police chief and a spokesman spokesman did not immediately respond to requests for comment.

If you would like to comment on this story, please visit Friday's crime and courts comments section.