Return `node`s representation as argument list.
775461
def visit_arguments(self, node: AST, dfltChaining: bool = True) -> str:
        """"""
        args = node.args
        dflts = node.defaults
        vararg = node.vararg
        kwargs = node.kwonlyargs
        kwdflts = node.kw_defaults
        kwarg = node.kwarg
        self.compact = True
        n_args_without_dflt = len(args) - len(dflts)
        args_src = (arg.arg for arg in args[:n_args_without_dflt])
        dflts_src = (f"{arg.arg}={self.visit(dflt)}"
                     for arg, dflt in zip(args[n_args_without_dflt:], dflts))
        vararg_src = (f"*{vararg.arg}",) if vararg else ()
        kwargs_src = ((f"{kw.arg}={self.visit(dflt)}"
                       if dflt is not None else f"{kw.arg}")
                      for kw, dflt in zip(kwargs, kwdflts))
        kwarg_src = (f"**{kwarg.arg}",) if kwarg else ()
        src = ', '.join(chain(args_src, dflts_src, vararg_src,
                              kwargs_src, kwarg_src))
        self.compact = False
        return src
1313424
def check_arguments(self):
        """"""
        for name, default in self.argdict.items():
            if name not in self.names and default is NODEFAULT:
                raise NameError('Missing argparse specification for %r' % name)
467504
def get_args(node):
    """"""
    arg_roles = {}
    args = node.findall('arg') + \
        [node.find('arg1'), node.find('arg2'), node.find('arg3')]
    for arg in args:
        if arg is not None:
            id = arg.attrib.get('id')
            if id is not None:
                arg_roles[arg.attrib['role']] = (arg.attrib['id'], arg)
    # Now look at possible inevent links
    if node.find('features') is not None:
        inevents = node.findall('features/inevent')
        for inevent in inevents:
            if 'id' in inevent.attrib:
                arg_roles['inevent'] = (inevent.attrib['id'], inevent)

        ptms = node.findall('features/ptm') + node.findall('features/no-ptm')
        for ptm in ptms:
            if 'id' in inevent.attrib:
                arg_roles['ptm'] = (inevent.attrib['id'], ptm)

    # And also look for assoc-with links
    aw = node.find('assoc-with')
    if aw is not None:
        aw_id = aw.attrib['id']
        arg_roles['assoc-with'] = (aw_id, aw)
    return arg_roles
310815
def _args_to_dict(func, args):
    """"""
    if sys.version_info >= (3, 0):
        arg_count = func.__code__.co_argcount
        arg_names = func.__code__.co_varnames[:arg_count]
    else:
        arg_count = func.func_code.co_argcount
        arg_names = func.func_code.co_varnames[:arg_count]

    arg_value_list = list(args)
    arguments = dict((arg_name, arg_value_list[i])
                     for i, arg_name in enumerate(arg_names)
                     if i < len(arg_value_list))
    return arguments
1314321
def filter(self, *args):
    """"""
    if not args:
      return self
    preds = []
    f = self.filters
    if f:
      preds.append(f)
    for arg in args:
      if not isinstance(arg, Node):
        raise TypeError('Cannot filter a non-Node argument; received %r' % arg)
      preds.append(arg)
    if not preds:
      pred = None
    elif len(preds) == 1:
      pred = preds[0]
    else:
      pred = ConjunctionNode(*preds)
    return self.__class__(kind=self.kind, ancestor=self.ancestor,
                          filters=pred, orders=self.orders,
                          app=self.app, namespace=self.namespace,
                          default_options=self.default_options,
                          projection=self.projection, group_by=self.group_by)
591508
def label( self, node ):
        """"""
        result = []
        if node.get('type'):
            result.append( node['type'] )
        if node.get('name' ):
            result.append( node['name'] )
        elif node.get('value') is not None:
            result.append( unicode(node['value'])[:32])
        if 'module' in node and not node['module'] in result:
            result.append( ' in %s'%( node['module'] ))
        if node.get( 'size' ):
            result.append( '%s'%( mb( node['size'] )))
        if node.get( 'totsize' ):
            result.append( '(%s)'%( mb( node['totsize'] )))
        parent_count = len( node.get('parents',()))
        if parent_count > 1:
            result.append( '/%s refs'%( parent_count ))
        return " ".join(result)
1306013
def p_argument_list(self, p):
        
        if len(p) == 2:
            p[0] = [p[1]]
        else:
            p[1].append(p[3])
            p[0] = p[1]
1322028
def get_list_objects_arg_dict(self, node_type):
        
        arg_dict = {
            # Restrict query for faster debugging
            # "fromDate": datetime.datetime(2017, 1, 1),
            # "toDate": datetime.datetime(2017, 1, 10),
        }
        if node_type == "cn":
            arg_dict["nodeId"] = django.conf.settings.NODE_IDENTIFIER
        return arg_dict
884923
def getArguments(names, local_dict=None, global_dict=None):
    """"""
    call_frame = sys._getframe(2)

    clear_local_dict = False
    if local_dict is None:
        local_dict = call_frame.f_locals
        clear_local_dict = True
    try:
        frame_globals = call_frame.f_globals
        if global_dict is None:
            global_dict = frame_globals

        # If `call_frame` is the top frame of the interpreter we can't clear its 
        # `local_dict`, because it is actually the `global_dict`.
        clear_local_dict = clear_local_dict and not frame_globals is local_dict

        arguments = []
        for name in names:
            try:
                a = local_dict[name]
            except KeyError:
                a = global_dict[name]
            arguments.append(numpy.asarray(a))
    finally:
        # If we generated local_dict via an explicit reference to f_locals,
        # clear the dict to prevent creating extra ref counts in the caller's scope
        # See https://github.com/pydata/numexpr/issues/310
        if clear_local_dict:
            local_dict.clear()

    return arguments
548513
function parseArgs(node) {
  let parsedArgs = [];

  if (isCallExpression(node)) {
    parsedArgs = node.arguments
      .filter(argument => isLiteral(argument) && argument.value)
      .map(argument => argument.value);
  }

  return parsedArgs;
}
101841
def getArguments(parser):
    ""
    args = parser.parse_args()
    if not '{}' in args.output:
        raise argparse.ArgumentError(args.output, 'The output argument string must contain the sequence "{}".')
    return args
609650
def nodes_ali(c_obj):
    """"""
    ali_nodes = []
    try:
        ali_nodes = c_obj.list_nodes()
    except BaseHTTPError as e:
        abort_err("\r HTTP Error with AliCloud: {}".format(e))
    ali_nodes = adj_nodes_ali(ali_nodes)
    return ali_nodes
1152611
def arguments(self):
        """"""
        if 'arguments' in self.attributes:
            LOGGER.warning(
                "WARNING: 'arguments' use in OSU yaml configuration file is deprecated. Please use 'options'!"
            )
            arguments = self.attributes['arguments']
            if isinstance(arguments, dict):
                return arguments
            else:
                return {k: arguments for k in self.categories}
        elif 'options' in self.attributes:
            options = self.attributes['options']
            if isinstance(options, dict):
                return options
            else:
                return {k: options for k in self.categories}
240980
def get_nodes(self, coord, coords):
        """"""
        def get_coord(coord):
            return coords.get(coord, self.ds.coords.get(coord))
        return list(map(get_coord,
                        coord.attrs.get('node_coordinates', '').split()[:2]))
857750
def node_labels(self):
        """"""
        assert list(self.node_indices)[0] == 0
        labels = list("m{}".format(i) for i in self.node_indices)
        return NodeLabels(labels, self.node_indices)
1013526
def get_inputs(node, kwargs):
    """"""
    name = node["name"]
    proc_nodes = kwargs["proc_nodes"]
    index_lookup = kwargs["index_lookup"]
    inputs = node["inputs"]
    attrs = node.get("attrs", {})

    input_nodes = []
    for ip in inputs:
        input_node_id = index_lookup[ip[0]]
        input_nodes.append(proc_nodes[input_node_id].name)

    return name, input_nodes, attrs
147493
def _represent_arguments(*arguments, **keyword_arguments):
    
    argument_strings = [repr(a) for a in arguments]
    keyword_strings = [
        '='.join((k, repr(v))) for k, v in keyword_arguments.items()]
    return ', '.join(argument_strings + keyword_strings)