python gender-based model