PyFunction (@NotNull final PyClass to) { final PyFunctionBuilder functionBuilder = new PyFunctionBuilder(PyNames.INIT, to); functionBuilder.parameter(PyNames.CANONICAL_SELF); //TODO: Take param from codestyle? final PyFunction function = functionBuilder.buildFunction(); return PyClassRefactoringUtil.addMethods(to, true, function).get(0); }