def METHOD_NAME(
        self, policy_data, environment=None, err_execs=(),
        log_level=logging.INFO):
    work_dir = self.change_cwd()
    self.patch(handler, 'policy_data', None)
    self.patch(handler, 'policy_config', None)
    # don't require api creds to resolve account id
    if 'execution-options' not in policy_data:
        policy_data['execution-options'] = {'account_id': '007'}
    elif 'account_id' not in policy_data['execution-options']:
        policy_data['execution-options']['account_id'] = '007'
    with open(os.path.join(work_dir, 'config.json'), 'w') as fh:
        json.dump(policy_data, fh, indent=2)
    output = self.capture_logging('custodian.lambda', level=log_level)
    if environment:
        self.change_environment(**environment)
    policy_execution = []
    validation_called = []
    def validate(self):
        validation_called.append(True)
    def push(self, event, context):
        policy_execution.append((event, context))
        if err_execs:
            raise err_execs.pop(0)
    self.patch(Policy, "push", push)
    self.patch(Policy, "validate", validate)
    return output, policy_execution