def main():
    # logging, the basicConfig is for futures, setup_default_logger is for flowy
    logging.basicConfig()
    setup_default_logger()

    def workflow(workflow_class):
        try:
            return globals()[workflow_class]
        except KeyError:
            raise ValueError('Workflow "%s" not found.' % workflow_class)

    parser = argparse.ArgumentParser(description='Example workflow runner.')
    parser.add_argument('workflow', action='store', type=workflow)
    parser.add_argument('--pure', action='store_true', default=False)
    parser.add_argument('--workflow-workers',
                        action='store',
                        type=int,
                        default=2)
    parser.add_argument('--activity-workers',
                        action='store',
                        type=int,
                        default=8)
    parser.add_argument('--timeit', action='store_true', default=False)
    parser.add_argument('--trace', action='store_true', default=False)
    parser.add_argument('--wait-children', action='store_true', default=False)
    args = parser.parse_args()

    start = time.time()
    if args.pure:
        wf = args.workflow(activity)
        result = wf()
    else:
        lw = LocalWorkflow(args.workflow,
                           activity_workers=args.activity_workers,
                           workflow_workers=args.workflow_workers)
        lw.conf_activity('a', activity)
        result = lw.run(_wait=args.wait_children, _trace=args.trace)
    if args.timeit:
        print('Timed at:', time.time() - start)
    print('Result:', result)
dataset/ETHPy150Open severb/flowy/tests/examples.py/main/original