This is the callback after the call to the alchemy service. Set up as a var within this scope, so it has access to node, msg etc. in preparation for the Alchemy service action
171605
function(err, keywords) {
        if (err || keywords.status === 'ERROR') {
          node.status({fill:'red', shape:'ring', text:'call to alchmeyapi vision service failed'});
          console.log('Error:', msg, err);
          node.error(err, msg);
        }
        else {
          msg.result = keywords[FEATURE_RESPONSES[feature]] || [];
          msg.fullresult = {};
          msg.fullresult['all'] = keywords;
          node.send(msg);
        }
      }
1304521
function after(ctx) {
  var fn = lookup(ctx.operation, 'middleware', 'after');
  var prefix = describe(ctx);

  if (fn) {
    return fn(ctx);
  } else {
    debug(prefix + 'after middleware disabled (not defined)');
  }
}
168581
function processCall(msg) {
      var route = msg.route;
      if(!!route) {
        if (!!msg.body) {
          var body = msg.body.body;
          if (!body) {body = msg.body;}
          pomelo.emit(route, body);
        } else {
          pomelo.emit(route,msg);
        }
      } else {
          pomelo.emit(msg.body.route,msg.body);
      }
    }
461204
function(callback) {
            var that = this;
            var url = this.paths.login;
            var params = {
                username: this.username,
                password: this.password,
                cookie  : '1'
            };

            callback = callback || function() {};
            var wrappedCallback = function(err, response) {
                // Let's make sure that not only did the request succeed, but
                // we actually got a non-empty session key back.
                var hasSessionKey = !!(!err && response.data && response.data.sessionKey);

                if (err || !hasSessionKey) {
                    callback(err || "No session key available", false);
                }
                else {
                    that.sessionKey = response.data.sessionKey;
                    callback(null, true);
                }
            };

            return this.http.post(
                this.urlify(url),
                this._headers(),
                params,
                this.timeout,
                wrappedCallback
            );
        }
337647
def state_callback(before_or_after = :before)
      method_name = :"#{before_or_after}_#{@order.state}"
      send(method_name) if respond_to?(method_name, true)
    end
1186449
public function callback() {
		echo "<strong>Note: </strong>Application should set callback URL to application-side for further specific authentication process.\n<br>";

		$response = array();
		switch($this->env['callback_transport']) {
			case 'session':
				if (!session_id()) {
					session_start();
				}
				$response = $_SESSION['opauth'];
				unset($_SESSION['opauth']);
				break;
			case 'post':
				$response = unserialize(base64_decode( $_POST['opauth'] ));
				break;
			case 'get':
				$response = unserialize(base64_decode( $_GET['opauth'] ));
				break;
			default:
				echo '<strong style="color: red;">Error: </strong>Unsupported callback_transport.'."<br>\n";
				break;
		}


		if (array_key_exists('error', $response)) {  // Check if it's an error callback
			echo '<strong style="color: red;">Authentication error: </strong> Opauth returns error auth response.'."<br>\n";
		} else { // No it isn't. Proceed with auth validation
			if (empty($response['auth']) || empty($response['timestamp']) || empty($response['signature']) || empty($response['auth']['provider']) || empty($response['auth']['uid'])) {
				echo '<strong style="color: red;">Invalid auth response: </strong>Missing key auth response components.'."<br>\n";
			} elseif (!$this->validate(sha1(print_r($response['auth'], true)), $response['timestamp'], $response['signature'], $reason)) {
				echo '<strong style="color: red;">Invalid auth response: </strong>'.$reason.".<br>\n";
			} else {
				echo '<strong style="color: green;">OK: </strong>Auth response is validated.'."<br>\n";
			}
		}

		/**
		 * Auth response dump
		 */
		echo "<pre>";
		print_r($response);
		echo "</pre>";
	}
167561
function(args, callInstance) {
    handlers.afterFunc({name: callInstance.name}, null, args, callInstance);
  }
53457
function callbackOnce(err, arg) {
            var cb = callback;
            callback = null;
            if (cb) { cb(err, arg); }
        }
364275
function init(callbackName, callbacks = [() => {}], vars){

	callbacks.forEach(cb => cb(this, vars));

	this[callbackName]? this[callbackName](vars): null;
	this::trigger(callbackName, vars);
}
116406
function () {

            var res = arguments[0];

            userOptions.emit('response', req, res);

            if (callback && userOptions.resCallback) callback.apply(this, arguments);

            res.on('end', function() {
                userOptions.emit('afterResponse', req, res);
            });

        }
375466
def _after_handler(self, iid, callback, args):
        """"""
        self._after_id = None
        self.update_state(iid, "normal")
        self.call_callbacks(iid, callback, args)
732494
def callback(self, request, **kwargs):
        
        return super(ServiceTwitter, self).callback(request, **kwargs)
1108338
function visit(ast, callback) {
            if(callback && typeof callback.visitNode === 'function') {
            	var ret = visitNode(callback, ast);
                endVisitNode(callback, ast);
                if(ret === this.BREAK) {
                    return;
                }
            }
        }
453160
def configure_scope(self, callback=None):  # noqa
        """"""

        client, scope = self._stack[-1]
        if callback is not None:
            if client is not None:
                callback(scope)

            return None

        @contextmanager
        def inner():
            if client is not None:
                yield scope
            else:
                yield Scope()

        return inner()
749788
function(callback){
        var on_keyspace = function(err){
            if(err){ return callback(err);}
            this._set_client(new cql.Client(this._connection));
            callback(err, this);
        };

        if(this._keyspace){
            this._assert_keyspace( on_keyspace.bind(this) );
        }else{
            on_keyspace.call(this);
        }
    }
1314861
def callback(self, request, **kwargs):
        
        access_token = request.session['oauth_token'] + "#TH#"
        access_token += str(request.session['oauth_id'])
        kwargs = {'access_token': access_token}
        return super(ServiceGithub, self).callback(request, **kwargs)
1006067
def _client_request_callback(self, request: Request):
        ''''''
        self._item_session = self._new_item_session(request)
        self._item_session.request = request

        if self._cookie_jar:
            self._cookie_jar.add_cookie_header(request)

        verdict, reason = self._fetch_rule.check_subsequent_web_request(self._item_session)
        self._file_writer_session.process_request(request)

        if verdict:
            _logger.info(__(
                _('Fetching ‘{url}’.'),
                url=request.url_info.url
            ))

        return verdict