This might be worth a try:

def NAD27toWGS84(coord):
return ConvertDatum(coord, Datum_WGS84, Datum_WGS84)

(change the existing NAD27toWGS84 function), then you keep the coord= line the way it was before.