def build_article_set(secao_list):
    """
    Takes the value of 'secao' key in a 'config' dict ('secao_list') that
    specifies which DOU sections to download and return a set of all possible 
    sections that might be downloaded: (sections 1, 2 and 3 from ordinary, 
    extra or sumplement editions).
    """
    # First select ordinary sections:
    sel_set = [str(s) for s in secao_list if str(s) in ['1', '2', '3']]
    # Then select all sections that might appear in an extra edition:
    sel_set = sel_set + ['1e', '2e', '3e'] if 'e'  in secao_list else sel_set
    # Then select all sections that might appear in an suplement edition (maybe it is just 1):
    sel_set = sel_set + ['1a', '2a', '3a'] if '1a' in secao_list else sel_set
    return set(sel_set)