Converting functions to methods in Python 3.12

I have a Python program that has 1,000s of functions (def), and none of them are using classes. Is there an automated way to convert these functions into class methods? I would group related functions together as needed. I tried snippets (Python 3.x), and python code, but nothing worked as expected.

Converting functions to methods in Python 3.12

I have a Python program that has 1,000s of functions (def), and none of them are using classes.

Is there an automated way to convert these functions into class methods? I would group related functions together as needed.

I tried snippets (Python 3.x), and python code, but nothing worked as expected.