def unpack_callbacks(cbs):
 if cbs:
  return [[i for i in f if i] for f in zip(*cbs)]
 else:
  return [(), (), (), (), ()]

def unpack_callbacks ( cbs ) : if cbs : return [ [ i for i in f if i ] for f in zip ( * cbs ) ] else : return [ ( ) , ( ) , ( ) , ( ) , ( ) ]
take an iterable of callbacks .