def is_valid_sync_payload(available_locations, available_browsers, status, locations, all_browsers): if status is not True: return False if isinstance(all_browsers, bool): return False if not available_locations or not available_browsers: return False if not locations or not all_browsers: return False return True