def split_file(splitNum, fileInput, lines):
    """
    split_file is used to split fileInput into splitNum small pieces file.
    For example, when splitNum is 56, a 112 lines file will be split into 56 files and each file has 2 lines.

    :param splitNum: split into splitNum files
    :param fileInput: file to be split
    :param lines: lines of fileInput
    """
    quot = lines // splitNum
    rema = lines % splitNum
    files = []
    current_line = 0
    for i in range(splitNum):
        if i < rema:
            read_line = quot + 1
        else:
            read_line = quot
        temp = tempfile.NamedTemporaryFile()
        os.system("head -n%d %s| tail -n%d > %s" % (current_line + read_line, fileInput, read_line, temp.name))
        current_line += read_line
        files.append(temp)

    return files
split_file is used to split fileInput into splitNum small pieces file.
    For example, when splitNum is 56, a 112 lines file will be split into 56 files and each file has 2 lines.

    :param splitNum: split into splitNum files
    :param fileInput: file to be split
    :param lines: lines of fileInput