def METHOD_NAME(attr: cudart.cudaDeviceAttr, device: int):
    """
    Returns information about the device.
    Parameters
    ----------
        attr : cudaDeviceAttr
            Device attribute to query
        device : int
            Device number to query
    This function automatically raises CUDARuntimeError with error message
    and status code.
    """
    status, value = cudart.cudaDeviceGetAttribute(attr, device)
    if status != cudart.cudaError_t.cudaSuccess:
        raise CUDARuntimeError(status)
    return value