def get_total_line_for_file(path_to_file, ignore_blank_lines=False):
    """
    Calculate the total number of line in the given file.
    """
    i = 0
    with open(path_to_file) as f:
        for line in f:
            if line == '\n' and ignore_blank_lines:
                pass
            else:
                i += 1
    return i
