Replace callable tokens with callable names.

        :param call: Encoded callable  name
        :type  call: string

        :rtype: string
358982
def decode_call(self, call):
        
        # Callable name is None when callable is part of exclude list
        if call is None:
            return None
        itokens = call.split(self._callables_separator)
        odict = {}
        for key, value in self._clut.items():
            if value in itokens:
                odict[itokens[itokens.index(value)]] = key
        return self._callables_separator.join([odict[itoken] for itoken in itokens])
599056
def token(name):
    

    def wrap(f):
        tokenizers.append((name, f))
        return f

    return wrap
1287596
def wrap_in_fn_call(fn_name, args, prefix=None):
    
    assert len(args) > 0
    if len(args) == 2:
        expr1, expr2 = args
        newargs = [expr1, Comma(), expr2]
    else:
        newargs = args
    return Call(Name(fn_name), newargs, prefix=prefix)
850608
def handle_aliases_in_calls(name, import_alias_mapping):
    
    for key, val in import_alias_mapping.items():
        # e.g. Foo == Foo
        # e.g. Foo.Bar startswith Foo.
        if name == key or \
                name.startswith(key + '.'):

            # Replace key with val in name
            # e.g. StarbucksVisitor.Tea -> Eataly.Tea because
            #   "from .nested_folder import StarbucksVisitor as Eataly"
            return name.replace(key, val)
    return None
604574
def _updateCallSetIds(self, variantFile):
        
        if len(self._callSetIdMap) == 0:
            for sample in variantFile.header.samples:
                self.addCallSetFromName(sample)
1149143
def create_filter_callable(self, args, target, is_expression):
        """"""

        def locate_encode(name):
            if re.match(r'decode\..+', name):
                return "filters." + name
            elif self.compiler.disable_unicode:
                return filters.NON_UNICODE_ESCAPES.get(name, name)
            else:
                return filters.DEFAULT_ESCAPES.get(name, name)

        if 'n' not in args:
            if is_expression:
                if self.compiler.pagetag:
                    args = self.compiler.pagetag.filter_args.args + args
                if self.compiler.default_filters:
                    args = self.compiler.default_filters + args
        for e in args:
            # if filter given as a function, get just the identifier portion
            if e == 'n':
                continue
            m = re.match(r'(.+?)(\(.*\))', e)
            if m:
                ident, fargs = m.group(1, 2)
                f = locate_encode(ident)
                e = f + fargs
            else:
                e = locate_encode(e)
                assert e is not None
            target = "%s(%s)" % (e, target)
        return target
24169
def visit_Call(self, node):
        
        args = [self.visit(arg) for arg in node.args]
        func = self.visit(node.func)
        params = args + [func or []]
        return list({frozenset.union(*p) for p in itertools.product(*params)})
276648
def call(self, fn, *args, **kwargs):
        
        return self.default_call_chain.call(fn, *args, **kwargs)
443236
def make_func_call(id_, lineno, params):
    
    return symbols.FUNCCALL.make_node(id_, params, lineno)
579003
def _handleCallInitiated(self, regexMatch, callId=None, callType=1):
        
        if self._dialEvent:
            if regexMatch:
                groups = regexMatch.groups()
                # Set self._dialReponse to (callId, callType)
                if len(groups) >= 2:
                    self._dialResponse = (int(groups[0]) , int(groups[1]))
                else:
                    self._dialResponse = (int(groups[0]), 1) # assume call type: VOICE
            else:
                self._dialResponse = callId, callType
            self._dialEvent.set()
419885
def resolve_name_with_call_id(caller_id, ns, name, remappings)
      name = canonicalize_name(expand_local_name(caller_id, name))
      if remappings
        remappings.each_pair do |key, value|
          if name == canonicalize_name(key)
            name = value
          end
        end
      end
      if ns
        name = ns + SEP + name
      end
      return canonicalize_name(name)
    end
1013180
def _generate_create_callable(name, display_name, arguments, regex, doc, supported, post_arguments, is_action):
    
    def f(self, *args, **kwargs):
        for key, value in args[-1].items():
            if type(value) == file:
                return self._put_or_post_multipart('POST', self._generate_url(regex, args[:-1]), args[-1])
        return self._put_or_post_json('POST', self._generate_url(regex, args[:-1]), args[-1])
    if is_action:
        f.__name__ = str(name)
    else:
        f.__name__ = str('create_%s' % name)
    f.__doc__ = doc
    f._resource_uri = regex
    f._get_args = arguments
    f._put_or_post_args = post_arguments
    f.resource_name = display_name
    f.is_api_call = True
    f.is_supported_api = supported
    return f
743511
def _process_token(cls, token):
        """"""
        assert type(token) is _TokenType or callable(token), \
            'token type must be simple type or callable, not %r' % (token,)
        return token
359431
def clone(self, callable=None, **overrides):
        
        old = {k: v for k, v in self.get_param_values()
               if k not in ['callable', 'name']}
        params = dict(old, **overrides)
        callable = self.callable if callable is None else callable
        return self.__class__(callable, **params)
337609
function parseFunctionCall(name) {
                    var token, expr, args = [];

                    token = lexer.next();
                    if (!matchOp(token, '(')) {
                        throw new SyntaxError('Expecting ( in a function call "' + name + '"');
                    }

                    token = lexer.peek();
                    if (!matchOp(token, ')')) {
                        args = parseArgumentList();
                    }

                    token = lexer.next();
                    if (!matchOp(token, ')')) {
                        throw new SyntaxError('Expecting ) in a function call "' + name + '"');
                    }

                    expr = new MathLib.Expression({
                        subtype: 'functionCall',
                        value: name,
                        content: args
                    });

                    if (name in MathLib && MathLib[name].type === 'functn') {
                        if (MathLib[name].expression.content[0].hasOwnProperty('cdgroup')) {
                            expr.cdgroup = MathLib[name].expression.content[0].cdgroup;
                        }

                        if (MathLib[name].expression.content[0].hasOwnProperty('contentMathMLName')) {
                            expr.contentMathMLName = MathLib[name].expression.content[0].contentMathMLName;
                        }

                        if (MathLib[name].expression.content[0].hasOwnProperty('toContentMathML')) {
                            expr.toContentMathML = MathLib[name].expression.content[0].toContentMathML;
                        }

                        if (MathLib[name].expression.content[0].hasOwnProperty('toLaTeX')) {
                            expr.toLaTeX = MathLib[name].expression.content[0].toLaTeX;
                        }

                        if (MathLib[name].expression.content[0].hasOwnProperty('toMathML')) {
                            expr.toMathML = MathLib[name].expression.content[0].toMathML;
                        }

                        if (MathLib[name].expression.content[0].hasOwnProperty('toString')) {
                            expr.toString = MathLib[name].expression.content[0].toString;
                        }
                    }

                    return expr;
                }
1100095
def visit_call(self, node):
        """"""
        expr_str = self._precedence_parens(node, node.func)
        args = [arg.accept(self) for arg in node.args]
        if node.keywords:
            keywords = [kwarg.accept(self) for kwarg in node.keywords]
        else:
            keywords = []

        args.extend(keywords)
        return "%s(%s)" % (expr_str, ", ".join(args))
987840
def getCallSetByName(self, name):
        
        if name not in self._callSetNameMap:
            raise exceptions.CallSetNameNotFoundException(name)
        return self._callSetNameMap[name]