Return an _AbstractSyntaxTreeNode with some elements defaulted.
351805
def _node(handler, single=None, multi=None):
    """"""
    return _AbstractSyntaxTreeNode(handler=handler,
                                   single=(single if single else []),
                                   multi=(multi if multi else []))
845714
def defaults(current: dict, *args: AnyMapping) -> dict:
    
    """
    for data in args:
        for key, value in data.items():
            current.setdefault(key, value)
    return current
113892
public static LuceneDefaults fromAnnotation(Defaults defaults) {
        LuceneDefaults lid = new LuceneDefaults();
        boolean hasValues = false;

        if (!StringUtils.isBlank(defaults.field())) {
            lid.setField(defaults.field());
            hasValues = true;
        }
        if (!StringUtils.isBlank(defaults.type())) {
            lid.setType(defaults.type());
            hasValues = true;
        }
        if (!StringUtils.isBlank(defaults.store())) {
            lid.setStore(defaults.store());
            hasValues = true;
        }
        if (!StringUtils.isBlank(defaults.index())) {
            lid.setIndex(defaults.index());
            hasValues = true;
        }
        return hasValues ? lid : null;
    }
481293
def get(self, selector, index=0, default=None):
        
        elements = self(selector)
        if elements:
            try:
                return elements[index]
            except (IndexError):
                pass
        return default
45846
def _type_string(label, case=None):
    """"""
    return label, abstractSearch.in_string, lambda s: abstractRender.default(s, case=case), ""
569732
def extract(text, default=UNKNOWN):
        """"""
        if not text:
            return default
        found = CALLING_CONVENTION_TYPES.pattern.match(text)
        if found:
            return found.group('cc')

        return default
284583
def _default_format(self, occur):
        """""" 
        if self.text or self.children:
            return self.start_tag() + "%s" + self.end_tag()
        return self.start_tag(empty=True)
101868
def handle_namespace_default(self, line: str, position: int, tokens: ParseResults) -> ParseResults:
        """"""
        name = tokens[NAME]
        self.raise_for_missing_default(line, position, name)
        return tokens
928022
def append(self, child, *args, **kwargs):
        """"""
        e = super(AbstractStructureElement,self).append(child, *args, **kwargs)
        self._setmaxid(e)
        return e
1101373
def GetDefault(self, container=None):
    """"""
    return rdfvalue.RDFBool(
        super(ProtoBoolean, self).GetDefault(container=container))
1265435
def _parse_variable_defaults(cls, defaults):
        """"""

        default_dict = {}

        for item in defaults:
            key = next(iter(item))
            value = item[key]

            if key in default_dict:
                raise RecipeFileInvalid("Default variable value specified twice", name=key, old_value=default_dict[key], new_value=value)

            default_dict[key] = value

        return default_dict
191526
def json(self,attribs =None, recurse=True, ignorelist=False):
        """"""
        if not attribs: attribs = {}
        if self.idref:
            attribs['id'] = self.idref
        return super(AbstractTextMarkup,self).json(attribs,recurse, ignorelist)
810782
def _default(self):
        
        if self.ctx.ignore_default:
            if not self.ctx.ignore_missing:
                self.ctx.errors.missing()
            return NOT_SET
        if self.default is NOT_SET:
            if not self.ctx.ignore_missing:
                self.ctx.errors.missing()
            return NOT_SET
        if self.default in IGNORE:
            return self.default
        if isinstance(self.default, Hook):
            if self.default:
                return self.default()
            if not self.ctx.ignore_missing:
                self.ctx.errors.missing()
            return NOT_SET
        if isinstance(self.default, type) or callable(self.default):
            return self.default()
        return self.default
1220664
def default(self, o):  # pylint: disable=method-hidden
        """"""
        if isinstance(o, set):
            return list(sorted(o))
        elif hasattr(o, 'as_dict'):
            return o.as_dict()
        else:
            return super(JSONEncoder, self).default(o)
137257
def completedefault(self, text, line, begidx, endidx):
        """"""
        if self.argparser_completer and any((line.startswith(x) for x in self.argparse_names())):
            self.argparser_completer.rl_complete(line, 0)
            return [x[begidx:] for x in self.argparser_completer._rl_matches]
        else:
            return []
1300370
def get_default_attrs(self):
        """"""
        attrs = super(BatchAction, self).get_default_attrs()
        attrs.update({'data-batch-action': 'true'})
        return attrs
522887
function getDefault() {
  const type = NodeType.DefaultType;
  const token = tokens[pos];
  const line = token.ln;
  const column = token.col;
  const content = joinValues(pos, token.defaultEnd);

  pos = token.defaultEnd + 1;

  return newNode(type, content, line, column);
}