Python script that emulates BemTV Baseline behavior