Helper functions and classes for running behavioral research experiments in python