public PyFunction buildFunction() {
    PyElementGenerator generator = PyElementGenerator.getInstance(mySettingAnchor.getProject());
    return generator.createFromText(LanguageLevel.forElement(mySettingAnchor), PyFunction.class, buildText(generator));
  }
public PyFunction buildFunction()