Look up possible targets for a call.
327319
public ImmutableList<TemplateMetadata> getTemplates(CallNode node) {
    if (node instanceof CallBasicNode) {
      String calleeName = ((CallBasicNode) node).getCalleeName();
      TemplateMetadata template = basicTemplatesOrElementsMap.get(calleeName);
      return template == null ? ImmutableList.of() : ImmutableList.of(template);
    } else {
      String calleeName = ((CallDelegateNode) node).getDelCalleeName();
      return delTemplateSelector.delTemplateNameToValues().get(calleeName);
    }
  }
651415
def visit_Call(self, node: ast.Call) -> None:
        """"""
        if node in self._recomputed_values:
            value = self._recomputed_values[node]
            text = self._atok.get_text(node)

            self.reprs[text] = value

        self.generic_visit(node=node)
107904
def handle_symbol_search(self, call_id, payload):
        """"""
        self.log.debug('handle_symbol_search: in %s', Pretty(payload))

        syms = payload["syms"]
        qfList = []
        for sym in syms:
            p = sym.get("pos")
            if p:
                item = self.editor.to_quickfix_item(str(p["file"]),
                                                    p["line"],
                                                    str(sym["name"]),
                                                    "info")
                qfList.append(item)
        self.editor.write_quickfix_list(qfList, "Symbol Search")
1360609
def getCall(self, n): #pylint: disable=invalid-name
        
        call_list = super(SinonSpy, self)._get_wrapper().call_list
        if n >= 0 and n < len(call_list):
            call = call_list[n]
            call.proxy = weakref.proxy(self)
            return call
        else:
            return None
5491
def _call(self, x):
        """"""
        return sum(fi(xi) for xi, fi in zip(x, self.functionals))
213255
def do_pending_lookups(event, sender, **kwargs):
    """"""
    key = (sender._meta.app_label, sender._meta.name)
    for callback in pending_lookups.pop(key, []):
        callback(sender)
746878
def lookup(source, keys, fallback = None):
  """"""
  try:
    for key in keys:
      source = source[key]
    return source
  except (KeyError, AttributeError, TypeError):
    return fallback
76282
def ListHunts(context=None):
  """"""

  items = context.SendIteratorRequest("ListHunts", hunt_pb2.ApiListHuntsArgs())
  return utils.MapItemsIterator(lambda data: Hunt(data=data, context=context),
                                items)
794536
def _get_callers(items, stage, special_cases=False):
    
    callers = utils.deepish_copy(_CALLERS[stage])
    if special_cases and "cnvkit" in callers:
        has_lumpy = any("lumpy" in get_svcallers(d) or "lumpy" in d["config"]["algorithm"].get("svcaller_orig", [])
                        for d in items)
        if has_lumpy and any("lumpy_usecnv" in dd.get_tools_on(d) for d in items):
            if stage != "initial":
                del callers["cnvkit"]
        else:
            if stage != "standard":
                del callers["cnvkit"]
    return callers
239076
def called_with(self, *args, **kwargs):
        
        expected_call = Call(*args, **kwargs)
        if expected_call in calls(self.spy):
            return True
        raise VerificationError(
            "expected %s to be called with %s, but it wasn't" % (
                self.spy, expected_call.formatted_args))
321361
def get_target(cls, scheme, path, fragment, username,
                   password, hostname, port, query, **kwargs):
        
        raise NotImplementedError("get_target must be overridden")
585726
def findLinksRel(link_attrs_list, target_rel):
    """"""
    # XXX: TESTME
    matchesTarget = lambda attrs: linkHasRel(attrs, target_rel)
    return list(filter(matchesTarget, link_attrs_list))
866193
def lookups(self):
        ""
        for filter in self._filters:
            yield filter.key, filter.display, filter.no_argument
418578
function _detectFeaturePhoneCarrier(ua) {
    switch (true) {
    case /DoCoMo/.test(ua):             return "DOCOMO";
    case /KDDI/.test(ua):               return "KDDI";
    case /SoftBank|Vodafone/.test(ua):  return "SOFTBANK";
    }
    return "";
}
1010053
def calls(self, call):
        
        exp = self._get_current_call()
        exp.call_replacement = call
        return self
193676
private Call getNextCall(Integer nextLimit, String continueToken) {
    PagerParams params = new PagerParams((nextLimit != null) ? nextLimit : limit, continueToken);
    return listFunc.apply(params);
  }
363951
def has_next(self):
        """"""
        if self._state == PhoneNumberMatcher._NOT_READY:
            self._last_match = self._find(self._search_index)
            if self._last_match is None:
                self._state = PhoneNumberMatcher._DONE
            else:
                self._search_index = self._last_match.end
                self._state = PhoneNumberMatcher._READY
        return (self._state == PhoneNumberMatcher._READY)