def proponent_projects(pronac, data):
    """
    Checks the CNPJ/CPF of the proponent of project
    with the given pronac and returns all the projects
    that have been submitted by this proponent and all
    projects that have already been analyzed.
    """
    cpf_cnpj = get_cpf_cnpj_by_pronac(pronac)

    proponent_submitted_projects = {}
    proponent_analyzed_projects = {}

    if cpf_cnpj:
        submitted_projects = get_proponent_submitted_projects(cpf_cnpj)
        analyzed_projects = get_proponent_analyzed_projects(cpf_cnpj)

        try:
            proponent_submitted_projects = {
                'number_of_projects': submitted_projects['num_pronacs'],
                'pronacs_of_this_proponent': submitted_projects['pronac_list']
            }
        except KeyError:
            pass

        try:
            proponent_analyzed_projects = {
                'number_of_projects': analyzed_projects['num_pronacs'],
                'pronacs_of_this_proponent': analyzed_projects['pronac_list']
            }
        except KeyError:
            pass

    return {
        'cpf_cnpj': cpf_cnpj,
        'valor': len(proponent_submitted_projects),
        'projetos_submetidos': proponent_submitted_projects,
        'projetos_analizados': proponent_analyzed_projects,
    }