Creates a new Python function definition.
The configuration arguments
ReadonlynameThe name of the function
ReadonlyparametersThe parameters of the function
ReadonlydecoratorsDecorators applied to the function
Optional ReadonlydocstringThe documentation string
Optional ReadonlyreturnThe return type annotation
ReadonlyisWhether this is a static method
ReadonlyisWhether this is a class method
ReadonlyisWhether this is an async function
Writes the function definition and its body to the writer.
The writer to write to
Returns the string representation of the AST node. This method creates a new Writer instance and writes the node's content to it.
The string representation of the AST node
Represents a Python function definition in the AST. This class handles the generation of Python function declarations including parameters, decorators, and return type annotations.