def METHOD_NAME(device_id):
    info_ptr = libpm.Pm_GetDeviceInfo(device_id)
    if info_ptr:
        info = info_ptr.contents
        return (
            info.interf,
            info.name,
            bool(info.input),
            bool(info.output),
            bool(info.opened),
        )