As state legislators continue to debate about the legalities of cannabis for medical and recreational use, Los Angeles-area prosecutors are flipping the script by turning to technology to wipe out or minimize as many as 50,000 old marijuana convictions, according to US News and World Report.

These legal eagles are following the lead of other district attorneys who use computer algorithms to identify eligible cases. District Attorney Jackie Lacey announced Monday that she is joining forces with a nonprofit organization, Code for America, in an effort to expunge thousands of weed convictions.

The move comes after San Francisco became the first city in the state to work with the organization to reportedly wipe out or reduce 8,000 convictions, CBS Sacramento reported.

“This collaboration will improve people’s lives by erasing the mistakes of their past and hopefully lead them on a path to a better future,” Lacey said in a statement Monday.

READ MORE: Maryland county linked to ‘lawyering while black’ case has other complaints of discrimination

“When we do this right, we show that government can make good on its promises, especially for the hundreds of thousands who have been denied jobs, housing and other opportunities despite the passage of laws intended to provide relief,” said Jennifer Pahlka, executive director of Code for America.

Computer coders with the group reportedly developed the Clear My Record algorithm, which identifies eligible cases and automatically fills out forms to file with the courts. In the past, convicts had to hire lawyers to get their records changed or file petitions on their own.

“Clear My Record changes the scale and speed of justice and has the potential to ignite change across the state and the nation,” Pahlka said.

When California voters legalized adult marijuana use in 2016, they also approved of eliminating or reducing pot related felonies to misdemeanors, according to ABC News.

Meanwhile, lawmakers and cannabis legalization advocates across the country are calling for reform and remedies to address this so-called war on drugs that has for decades disproportionately affected urban communities. Oakland city’s own statistics, for example, note that 77 percent of the marijuana arrests in 2015 were of Black folks, while Whites represented just 4 percent, according to the Chicago Sun-Times.

Similar data has been reported throughout the U.S., as people of color are still being targeted by police.

Could this be why prosecutors in Cali, Baltimore, Seattle, Chicago, Michigan and other cities are said to be eyeing the dismissal or reduction of eligible marijuana convictions?