def verify_cuda_ndarray_interface(obj):
    require_cuda_ndarray(obj)

    def requires_attr(attr, typ):
        if not hasattr(obj, attr):
            raise AttributeError(attr)
        if not isinstance(getattr(obj, attr), typ):
            raise AttributeError('%s must be of type %s' % (attr, typ))

    requires_attr('shape', tuple)
    requires_attr('strides', tuple)
    requires_attr('dtype', np.dtype)
    requires_attr('size', (int, long))
Call grains.items via the attribute
dataset/ETHPy150Open numba/numba/numba/cuda/cudadrv/devicearray.py/verify_cuda_ndarray_interface--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/test.py/attr_call