def generate_python_func(
        self, class_origin: str, class_func: str, params: str
    ) -> Variable:
        """
        Generates a command attached to a python function
        """
        func_name = "method_handler{}".format(self.counter)
        created_func = ExistingCode.METHOD_HANDLER_TEMPLATE.value.format(
            func_name, class_origin, class_func, "filenames", params
        )

        self.counter += 1

        return Variable(f"self.{func_name}", created_func)

        Generates a command attached to a python function
        
context_menu/linux_menus.py