<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_window_name(self, win_id):
 """ Get a window's name, if any. """

        window = window_t(win_id)
        name_ptr = ctypes.c_char_p()
        name_len = ctypes.c_int(0)
        name_type = ctypes.c_int(0)
        _libxdo.xdo_get_window_name(
            self._xdo, window, ctypes.byref(name_ptr),
            ctypes.byref(name_len), ctypes.byref(name_type))
        name = name_ptr.value
        _libX11.XFree(name_ptr)  # Free the string allocated by Xlib
        return name