(cls, item, spec)
return name if name else default
Return value that should be in the flag column. Defaults to the
        question id if spec doesn't specify something else.
Return value that should be in the flag column. Defaults to the
        question id if spec doesn't specify something else.
Return value that should be in the flag column . Defaults to the question id if spec doesn t specify something else .
def _get_flag_name(cls, item, spec):
        """
        Return value that should be in the flag column. Defaults to the
        question id if spec doesn't specify something else.
        """
        default = spec['question'][-1]
        flag_name_key_map = {
            "fra": "flag_name_fr",
            "por": "flag_name_por",
            "en": "flag_name",
        }
        lang = cls._get_language(item)
        name = spec.get(flag_name_key_map[lang], None)
        return name if name else default
def _get_flag_name ( cls , item , spec ) : default = spec [ 'question' ] [ - 1 ] flag_name_key_map = { "fra" : "flag_name_fr" , "por" : "flag_name_por" , "en" : "flag_name" , } lang = cls . _get_language ( item ) name = spec . get ( flag_name_key_map [ lang ] , None ) return name if name else default