doing bbm in python