def _extract_bottom_cells_of_code(nb_dict, bottom_size):
    """
        It returns a list of the code cells between the last bottom_size cells of the notebook

        Args:
            nb_dict(dict): python dictionary object representing the jupyter notebook
            bottom_size(int): number of cells starting from the bottom of the dictionary
        Returns:
           cell_list: list of code cells between the last bottom_size cells of the notebook

        The function is used in:
        - count_bottom_empty_cells()
        - count_bottom_non_executed_cells()
    """
    cell_list = []
    counter = 1
    full_list = nb_dict["cells"]
    for cell in reversed(full_list):
        if counter <= bottom_size:
            if cell["cell_type"] == 'code':
                cell_list.append(cell)
                counter = counter + 1
        else:
            break
    return cell_list