please use PEP8 for variable names .... ad_type_binary .

What does 'ad' mean? Try to avoid abbreviations.