def _get_num_code_lines(code: list) -> int:
    """Calculates the number of code lines are available for use
    Arguments:
        code: the list of code lines
    Returns:
        Return the number of code lines that should be processed
    Notes:
        This will strip trailing whitespace from the code lines
    """
    num_lines = len(code)
    while num_lines > 0:
        cur_line = code[num_lines - 1].strip()
        if len(cur_line) <= 0:
            num_lines -= 1
        else:
            break

    return num_lines