human
I wrote the below code

    def is_import_stmt(node):
        return ((node.type == syms.simple_stmt) and node.children and is_import(node.children[0]))
    root = find_root(node)
    if does_tree_import(package, name, root):
        return
    insert_pos = offset = 0
    for (idx, node) in enumerate(root.children):
        if (not is_import_stmt(node)):
            continue
        for (offset, node2) in enumerate(root.children[idx:]):
            if (not is_import_stmt(node2)):
                break
        insert_pos = (idx + offset)
        break
    if (insert_pos == 0):
        for (idx, node) in enumerate(root.children):
            if ((node.type == syms.simple_stmt) and node.children and (node.children[0].type == token.STRING)):
                insert_pos = (idx + 1)
                break
    if (package is None):
        import_ = Node(syms.import_name, [Leaf(token.NAME, u'import'), Leaf(token.NAME, name, prefix=u'    ')])
    else:
        import_ = FromImport(package, [Leaf(token.NAME, name, prefix=u'    ')])
    children = [import_, Newline()]
    root.insert_child(insert_pos, Node(syms.simple_stmt, children))

What's a good function header?
assistant
#Here's a good function header.

def touch_import(package, name, node):