def preprocess(self, dataframe):

    def cb(name):
        obj = self
        inp = dataframe
        h = obj.get(inp.name)
        tmp = None
        if ((not h) or (h != inp.hash)):
            org = inp.data
            tmp = org
            h = inp.hash
            obj._persist_numpy(tmp, inp.name)
            obj.put(inp.name, h)
        else:
            if (self._cached and (self._cached == inp.hash)):
                return self._cached_object
            tmp = obj._load_numpy(inp.name)
            self._cached_object = tmp
            self._cached = inp.hash
        return tmp
    h = 0
    if (not (self.get(dataframe.name) is None)):
        h = self.get(dataframe.name)
    r = BrewPipeDataFrame(dataframe.name, lazy_frame=True, hash=h, callback=cb)
    return r
def preprocess(self, dataframe):

    def cb(name):
        obj = self
        inp = dataframe
        h = obj.get(inp.name)
        tmp = None
        if ((not h) or (h != inp.hash)):
            org = inp.data
            tmp = org
            h = inp.hash
            obj._persist_numpy(tmp, inp.name)
            obj.put(inp.name, h)
        else:
            if (self._cached and (self._cached == inp.hash)):
                return self._cached_object
            tmp = obj._load_numpy(inp.name)
            self._cached_object = tmp
            self._cached = inp.hash
        return tmp
    h = 0
    if (not (self.get(dataframe.name) is None)):
        h = self.get(dataframe.name)
    r = BrewPipeDataFrame(dataframe.name, lazy_frame=True, hash=h, callback=cb)
    return r