def is_bumper_enabled(video):
 bumper_last_view_date = getattr(video, 'bumper_last_view_date', None)
 utc_now = datetime.utcnow().replace(tzinfo=pytz.utc)
 periodicity = settings.FEATURES.get('SHOW_BUMPER_PERIODICITY', 0)
 has_viewed = any([video.bumper_do_not_show_again, (bumper_last_view_date and ((bumper_last_view_date + timedelta(seconds=periodicity)) > utc_now))])
 is_studio = getattr(video.system, 'is_author_mode', False)
 return bool(((not is_studio) and settings.FEATURES.get('ENABLE_VIDEO_BUMPER') and get_bumper_settings(video) and edxval_api and (not has_viewed)))

def is_bumper_enabled ( video ) : bumper_last_view_date = getattr ( video , 'bumper_last_view_date' , None ) utc_now = datetime . utcnow ( ) . replace ( tzinfo = pytz . utc ) periodicity = settings . FEATURES . get ( 'SHOW_BUMPER_PERIODICITY' , 0 ) has_viewed = any ( [ video . bumper_do_not_show_again , ( bumper_last_view_date and ( ( bumper_last_view_date + timedelta ( seconds = periodicity ) ) > utc_now ) ) ] ) is_studio = getattr ( video . system , 'is_author_mode' , False ) return bool ( ( ( not is_studio ) and settings . FEATURES . get ( 'ENABLE_VIDEO_BUMPER' ) and get_bumper_settings ( video ) and edxval_api and ( not has_viewed ) ) )
check if bumper enabled .