def test():
    import pprint

    # This worker test requires a local server running
    workbench = zerorpc.Client(timeout=300, heartbeat=60)
    workbench.connect("tcp://127.0.0.1:4242")

    # Generate the input data for this worker
    import os
    data_path = os.path.join(os.path.dirname(os.path.realpath(__file__)),
                             '../data/pdf/bad/067b3929f096768e864f6a04f04d4e54')
    md5 = workbench.store_sample(open(data_path, 'rb').read(), 'bad_pdf', 'pdf')
    input_data = workbench.work_request('meta', md5)

    # Execute the worker
    worker = ViewDeep()
    output = worker.execute(input_data)
    print '\nViewDeep: '
    pprint.pprint(output)

    # Generate the input data for this worker
    data_path = os.path.join(os.path.dirname(os.path.realpath(__file__)),
                             '../data/pe/bad/033d91aae8ad29ed9fbb858179271232')
    md5 = workbench.store_sample(open(data_path, 'rb').read(), 'bad_pe', 'exe')
    input_data = workbench.work_request('meta', md5)

    # Execute the worker
    output = worker.execute(input_data)
    print '\nViewDeep: '
    pprint.pprint(output)

    # Generate the input data for this worker
    data_path = os.path.join(os.path.dirname(os.path.realpath(__file__)),
                             '../data/zip/good.zip')
    md5 = workbench.store_sample(open(data_path, 'rb').read(), 'good.zip', 'zip')
    input_data = workbench.work_request('meta', md5)

    # Execute the worker
    output = worker.execute(input_data)
    print '\nViewDeep: '
    pprint.pprint(output)
approximate pointwise variance for kernel density
dataset/ETHPy150Open SuperCowPowers/workbench/workbench/workers/view_deep.py/test--crossover with--dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/sandbox/nonparametric/kernels.py/CustomKernel.density_var