Creates a new Python function definition.
The configuration arguments
Readonly
nameThe name of the function
Readonly
parametersThe parameters of the function
Readonly
decoratorsDecorators applied to the function
Optional
Readonly
docstringThe documentation string
Optional
Readonly
returnThe return type annotation
Readonly
isWhether this is a static method
Readonly
isWhether this is a class method
Readonly
isWhether 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.