human
I wrote the below code

    import ctypes.wintypes
    CreateSymbolicLink = ctypes.windll.kernel32.CreateSymbolicLinkW
    CreateSymbolicLink.argtypes = (ctypes.wintypes.LPWSTR, ctypes.wintypes.LPWSTR, ctypes.wintypes.DWORD)
    CreateSymbolicLink.restype = ctypes.wintypes.BOOLEAN
    def format_system_message(errno):
        '\n                                Call    FormatMessage    with    a    system    error    number    to    retrieve\n                                the    descriptive    error    message.\n                                '
        ALLOCATE_BUFFER = 256
        ARGUMENT_ARRAY = 8192
        FROM_HMODULE = 2048
        FROM_STRING = 1024
        FROM_SYSTEM = 4096
        IGNORE_INSERTS = 512
        flags = (ALLOCATE_BUFFER | FROM_SYSTEM)
        source = None
        message_id = errno
        language_id = 0
        result_buffer = ctypes.wintypes.LPWSTR()
        buffer_size = 0
        arguments = None
        bytes = ctypes.windll.kernel32.FormatMessageW(flags, source, message_id, language_id, ctypes.byref(result_buffer), buffer_size, arguments)
        handle_nonzero_success(bytes)
        message = result_buffer.value
        ctypes.windll.kernel32.LocalFree(result_buffer)
        return message
    def handle_nonzero_success(result):
        if (result == 0):
            value = ctypes.windll.kernel32.GetLastError()
            strerror = format_system_message(value)
            raise WindowsError(value, strerror)
    target_is_directory = (target_is_directory or os.path.isdir(target))
    handle_nonzero_success(CreateSymbolicLink(link, target, target_is_directory))

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

def _symlink_win32(target, link, target_is_directory=False):