# Revision history [back]

To declare a function you can just follow this scheme

def function_name(<arguments>):
"Optional documentation string."
<Python/Sage instructions, could be multiple lines of code>
return <variable/expression>


In your case, I guess you'd like to receive G as an argument, so it could be of the form

def ihara( G ):