def take_action(self, parsed_args):
        self.log.debug('take_action(%s)' % parsed_args)
        client = self.app.client_manager.congressclient
        args = {}
        args['query'] = parsed_args.query
        args['sequence'] = parsed_args.sequence
        if parsed_args.action_policy is not None:
            args['action_policy'] = parsed_args.action_policy
        if parsed_args.delta:
            args['delta'] = parsed_args.delta
        if parsed_args.trace:
            args['trace'] = parsed_args.trace

        body = {'query': parsed_args.query,
                'sequence': parsed_args.sequence,
                'action_policy': parsed_args.action_policy}

        results = client.execute_policy_action(
            policy_name=parsed_args.policy,
            action="simulate",
            trace=parsed_args.trace,
            delta=parsed_args.delta,
            body=body)
        for result in results['result']:
            print(result)
        if 'trace' in results:
            print (results['trace'])
        return 0
dataset/ETHPy150Open openstack/python-congressclient/congressclient/osc/v1/policy.py/SimulatePolicy.take_action/original