def WriteMethodDeclaration(c, name, args, optargs):
    """ Write a method declaration:
    def name(self, args, optargs):
    in c """
    c.Write('def %s(self' % name)
    for a in args:
        c.Write(', %s' % a)
    for a in optargs:
        c.Write(', %s = None' % a)
    c.Write('):')
    c.NewLine()
    return
