Re Python Group Function Definition