I make a class, which I will include as source code (easy to correct).
As I understand, a problem is in setBIAndEventName. If I use self.bi, I get an event inside my class (expected). Guess, I need to use bi from main module, but I don't understand how to access it.