Returns result but ig chain method is used
        returns the object itself so we can chain
428772
def _wrap(self, ret):
        
        if self.chained:
            self._wrapped = ret
            return self
        else:
            return ret
790363
function chain(a, b) {
    var prop, descriptor = {};
    for (prop in a) {
        if (a.hasOwnProperty(prop)) {
            descriptor[prop] = Object.getOwnPropertyDescriptor(a, prop);
        }
    }
    return Object.create(b, descriptor);
}
715360
def get_result(self):
        
        translated = self.translate(self.expr)
        if self._needs_name(self.expr):
            # TODO: this could fail in various ways
            name = self.expr.get_name()
            translated = self.name(translated, name)
        return translated
1057627
def get_chain(self, index):
        
        chain = []
        this = self.leaves[index]
        chain.append((this.val, 'SELF'))
        while this.p:
            chain.append((this.sib.val, this.sib.side))
            this = this.p
        chain.append((this.val, 'ROOT'))
        return chain
612971
def get_corresponding_chains(self, from_pdb_id, from_chain_id, to_pdb_id):
        ''''''
        chains = self.chain_map.get(from_pdb_id, {}).get(from_chain_id, {}).get(to_pdb_id, [])
        return sorted(chains)
495485
async function () {
    const oThis = this
    ;

    const web3Provider = web3ProviderFactory.getProvider(oThis.chain, web3ProviderFactory.typeWS);
    if (!web3Provider) {
      let errObj = responseHelper.error({
        internal_error_identifier: 's_u_ga_1',
        api_error_identifier: 'invalid_chain',
        error_config: basicHelper.fetchErrorConfig()
      });
      return Promise.resolve(errObj);
    }

    var eth_address = await web3Provider.eth.personal.newAccount(oThis.passphrase);

    // returns a promise which resolves to an address which was created.
    return Promise.resolve(responseHelper.successWithData({address: eth_address}));
  }
1051640
function chain(fn, m) {
  if(!isFunction(fn)) {
    throw new TypeError('chain: Chain returning function required for first argument')
  }

  if(!(isChain(m) || isArray(m))) {
    throw new TypeError('chain: Chain of the same type required for second argument')
  }

  if(isArray(m)) {
    return _chain(fn, m)
  }

  return (m[fl.chain] || m.chain).call(m, fn)
}
1277392
function pattern () {
    var targ0 = typeof arguments[0];
    var targ1 = typeof arguments[1];
    var targ2 = typeof arguments[2];
  
    // Shared vars
    var matcherFn, patternObj, patternFn, patternStr, successFn, chain, tree, last;
  
    // pattern(matcherFn, chain)
    if (targ0 == "function" && (targ1 == "undefined" || targ1 == "object")) { 
      matcherFn = arguments[0];
      chain = arguments[1];
  
      // Throw an error if the supplied function does not have a match chain.
      if (!matcherFn.__matchChain) throw new Error("Not a matcher function");
  
      // Splice the chains together.
      if (chain) {
        chain = chain.clone();
        chain.last().next = matcherFn.__matchChain.clone();
      } else {
        chain = matcherFn.__matchChain.clone();
      }
  
      last = chain.pop();
      return matcher(last.patternFn, last.successFn, chain);
    }
  
    // pattern(patternObj, chain)
    else if (targ0 == "object" && (targ1 == "undefined" || targ1 == "object")) {
      patternObj = arguments[0];
      chain = arguments[1] ? arguments[1].clone() : null;
      for (patternStr in patternObj) {
        matcherFn = pattern(patternStr, patternObj[patternStr], chain);
        chain = matcherFn.__matchChain;
      }
      return matcherFn;
    }
  
    // pattern(patternFn, successFn, chain)
    else if (targ0 == "function" && targ1 == "function") {
      chain = arguments[2] ? arguments[2].clone() : null;
      return matcher(arguments[0], arguments[1], chain);
    }
  
    // pattern(patternStr, successFn, chain)
    else {
      patternStr = arguments[0];
      successFn = arguments[1];
      chain = arguments[2] ? arguments[2].clone() : null;
      patternFn = getOrCompile(patternStr);
      return matcher(patternFn, successFn, chain);
    }
  }
638248
function _get_result(Type) {
	return function(rows) {
		if(!rows) { throw new TypeError("failed to parse result"); }
		var doc = rows.shift();
		if(!doc) { return; }

		if(doc instanceof Type) {
			return doc;
		}

		var obj = {};
		ARRAY(Object.keys(doc)).forEach(function(key) {

			if(key === 'documents') {
				obj['$'+key] = {};
				ARRAY(Object.keys(doc[key])).forEach(function(k) {
					if(is.uuid(k)) {
						obj['$'+key][k] = _get_result(NoPg.Document)([doc[key][k]]);
					} else {
						obj['$'+key][k] = doc[key][k];
					}
				});
				return;
			}

			obj['$'+key] = doc[key];
		});

		_parse_object_expressions(obj);

		return new Type(obj);
	};
}
685595
@Override
    public synchronized ChainData getChain(String chainName) {
        ChainData chainData = null;
        // Ensure the input chain name is not null
        if (null != chainName) {
            chainData = this.chainDataMap.get(chainName);
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "getChain: " + chainName + " found=" + (null != chainData));
        }
        return chainData;
    }
170906
function () {
          if (this === global || !exists(this)) {
            throw new TypeError('this is null or not defined for ' + method)
          }
          var args = Array.prototype.slice.call(arguments)
          args.unshift(this) // sets first arg as object instance
          return method.apply(this, args)
        }
115451
function getResults(result, objects) {
		
		// if there are no results, resolve an empty array
		if (!result) {
			return new Promise(function(resolve, reject) {
				resolve([]);
			});
		}
		
		// if the result object is undefined or not an array, make it one
		result.objects = result.objects || [];
		result.objects = Array.isArray(result.objects) ? result.objects : [result.objects];
		objects        = _.union(objects, result.objects);
		
		// if the result has a token, there are more results, continue to get them
		if (result.token) {
			return _client.method('ContinueRetrievePropertiesEx', {
				_this: _client._sc.propertyCollector,
				token: result.token
			})
			.then(function(results) {
				return getResults(results, objects);
			});
		}
		
		// if there are no more results, return the formatted results
		else {
			return new Promise(function(resolve, reject) {
				resolve(env.format(objects));
			});
		}
	}
651639
def chain(cls, *iterables):
    

    def generator():
      for it in iterables:
        for element in it:
          yield element
    return cls(generator())
383503
def result(self):
        
        ret = self.get('result')
        if ret is not None:
            ret = u(ret)
        return ret
916469
function(i) {
            return _.map(this.items, function(item) {
                return this.$(this.Item.prototype.tagName).index(item.$el);
            }, this);
        }
553772
@Override
	public T get() {
		T result = object;
		if (result == null) {
			synchronized (this) {
				result = object;
				if (result == null) {
					object = result = init();
				}
			}
		}
		return result;
	}
338126
function matcher (patternFn, successFn, chain) {
    var matcherObj = new Matcher(patternFn, successFn);
  
    // If a chain was provided, add the new matcher to the end of the chain.
    if (chain) {
      chain.last().next = matcherObj;
    } else {
      chain = matcherObj;
    }
  
    var fn = function () {
      // This seems like an odd optimization, but manually copying the
      // arguments object over to an array instead of calling `slice` can
      // speed up dispatch time 2-3x.
      var args = [], i = 0, len = arguments.length;
      for (; i < len; i++) args[i] = arguments[i];
      return chain.match(args, this);
    };
  
    fn.alt = function () {
      var args = slice.call(arguments);
      args.push(chain);
      return pattern.apply(null, args);
    };
  
    fn.__matchChain = chain;
  
    return fn;
  }