Entropy Generating Function Method In Python Example