def METHOD_NAME(handle):
    """ Extracts data from the sensor and returns it in a JSON document as a Python dict.
    Available for poll mode only.
    Args:
        handle: handle returned by the plugin initialisation call
    Returns:
        returns a sensor reading in a JSON document, as a Python dict, if it is available
        None - If no reading is available
    Raises:
        Exception
    """
    try:
        time_stamp = utils.local_timestamp()
        depth = int(handle['depth']['value'])
        _LOGGER.info(" depth from config {} \n".format(str(depth)))
        if depth == 8:
            image = np.full((256,256), 0 , dtype=np.uint8)
            for i in range(0, 256):
                for j in range(0,256):
                        image[i][j] = i 
            data = {'asset':  handle['assetName']['value'], 'timestamp': time_stamp, 'readings': {"image": image}}
        elif depth == 16:
            image = np.full((256, 256), 0, dtype=np.uint16)
            for i in range(0, 256):
                for j in range(0, 256):
                    image[i][j] = i*i
            data = {'asset':  handle['assetName']['value'], 'timestamp': time_stamp, 'readings': {"image": image}}
        elif depth == 24:
            image = np.full((256, 256, 3), 0, dtype=np.uint8)
            for i in range(0, 32):
                for j in range(0, 256):
                    for k in range(0,3):
                        if k%3 == 0:
                            image[i][j][k] =  i*8
                        else:
                            image[i][j][k] = 0
            for i in range (32,64):
                for j in range(0,256):
                    for k in range(0,3):
                        if  k%3 == 0:
                            image[i][j][k] = 0         #R
                        elif k%3 == 1:
                            image[i][j][k] = (i%32)*8  #G
                        else:
                            image[i][j][k] = 0         #B
            for i in range(64,96):
                for j in range(0,256):    
                    for k in range(0,3):
                        if k%3 == 0:
                            image[i][j][k] = 0            #R
                        elif k%3 == 1:
                            image[i][j][k] = 0            #G
                        else:
                            image[i][j][k] = (i%32)*8     #B
            for i in range(96,128):
                for  j in range(0,256):
                    for k in range(0,3):
                        image[i][j][k] = (i%32)*8
            for i in range(128,256):
                for j in range(0,256):
                    for k in range(0,3):
                        if k%3 == 0:
                            image[i][j][k] = (i%128) * 4                  #R
                        elif k%3 == 1:
                            image[i][j][k] = 255 - ( ( i%128) * 4 )      #G
                        else:
                            image[i][j][k] = j                           #B
            data = {'asset':  handle['assetName']['value'], 'timestamp': time_stamp, 'readings': {"image": image}}
        else:
            pass
    except (Exception, RuntimeError) as ex:
        _LOGGER.exception("Imagetest exception: {}".format(str(ex)))
        raise ex
    else:
        return data