Merge some data in with this document's data.

 Returns the merged data.
339040
def merge_data!(other, source: "YAML front matter")
      merge_categories!(other)
      Utils.deep_merge_hashes!(data, other)
      merge_date!(source)
      data
    end
980459
def _merge_data(self, data: AnyMapping, *additional: AnyMapping) -> dict:
        
        """
        return defaults(
            dict(data) if not isinstance(data, dict) else data,
            *(dict(item) for item in additional))
619822
def merge(self, other):
        
        Stats.merge(self, other)
        self.changes += other.changes
1191964
def MergeData(self, merge_data, raw_data=None):
    """"""
    self.FlushCache()
    if raw_data is None:
      raw_data = self.raw_data

    for k, v in iteritems(merge_data):
      # A context clause.
      if isinstance(v, dict) and k not in self.type_infos:
        if k not in self.valid_contexts:
          raise InvalidContextError("Invalid context specified: %s" % k)
        context_data = raw_data.setdefault(k, collections.OrderedDict())
        self.MergeData(v, context_data)

      else:
        # Find the descriptor for this field.
        descriptor = self.type_infos.get(k)
        if descriptor is None:
          msg = ("Missing config definition for %s. This option is likely "
                 "deprecated or renamed. Check the release notes." % k)
          if flags.FLAGS.disallow_missing_config_definitions:
            raise MissingConfigDefinitionError(msg)

        if isinstance(v, string_types):
          v = v.strip()

        # If we are already initialized and someone tries to modify a constant
        # value (e.g. via Set()), break loudly.
        if self.initialized and k in self.constants:
          raise ConstModificationError(
              "Attempting to modify constant value %s" % k)

        raw_data[k] = v
445144
def merge_record_data(self, changes, orig_record=None):
        """"""
        current_app.logger.info("Merging request data with db record")
        current_app.logger.debug("orig_record: {}".format(orig_record))
        current_app.logger.debug("Changes".format(changes))
        final_record = changes
        if request.method == 'PATCH':
            final_record = dict(orig_record)
            final_record.update(changes)
        elif request.method == 'PUT':
            if '_id' in orig_record:
                final_record['_id'] = orig_record['_id']
        return final_record
1017127
def _perform_merge(self, other):
        
        if len(other.value) > len(self.value):
            self.value = other.value[:]
        return True
498778
def merge(blocks):
    

    current_block = blocks[sorted(blocks.keys())[0]]

    compressed_data = []
    eof = False

    while not eof:
        data_size_to_append = None
        next_block = None

        i = 0
        while i < len(current_block.data) - 1:
            current_byte = current_block.data[i]
            next_byte = current_block.data[i + 1]

            if current_byte == RLE_BYTE:
                if next_byte == RLE_BYTE:
                    i += 2
                else:
                    i += 3
            elif current_byte == SPECIAL_BYTE:
                if next_byte in SPECIAL_DEFAULTS:
                    i += 3
                elif next_byte == SPECIAL_BYTE:
                    i += 2
                else:
                    data_size_to_append = i

                    # hit end of file
                    if next_byte == EOF_BYTE:
                        eof = True
                    else:
                        next_block = blocks[next_byte]

                    break
            else:
                i += 1

        assert data_size_to_append is not None, "Ran off the end of a "\
            "block without encountering a block switch or EOF"

        compressed_data.extend(current_block.data[0:data_size_to_append])

        if not eof:
            assert next_block is not None, "Switched blocks, but did " \
                "not provide the next block to switch to"

            current_block = next_block

    return compressed_data
243474
def merge_configs(self, config, datas):
        
        if not isinstance(config, dict) or len([x for x in datas if not isinstance(x, dict)]) > 0:
            raise TypeError("Unable to merge: Dictionnary expected")

        for key, value in config.items():
            others = [x[key] for x in datas if key in x]
            if len(others) > 0:
                if isinstance(value, dict):
                    config[key] = self.merge_configs(value, others)
                else:
                    config[key] = others[-1]
        return config
640878
def merge_sources(self, datas):
        
        datas = [data for data in datas if data is not None]

        if len(datas) == 0:
            raise ValueError("Data missing")

        if len(datas) == 1:
            return datas[0]

        if isinstance(datas[0], list):
            if len([x for x in datas if not isinstance(x, list)]) > 0:
                raise TypeError("Unable to merge: List expected")
            base = []
            for x in datas:
                base = base + x
            return base

        if isinstance(datas[0], dict):
            if len([x for x in datas if not isinstance(x, dict)]) > 0:
                raise TypeError("Unable to merge: Dictionnary expected")
            result = {}
            for element in datas:
                for key in element:
                    if key in result:
                        result[key] = self.merge_sources([result[key], element[key]])
                    else:
                        result[key] = element[key]
            return result

        if len([x for x in datas if isinstance(x, (dict, list))]) > 0:
            raise TypeError("Unable to merge: List not expected")

        raise ValueError("Unable to merge: Conflict")
1065250
public VersionInfo merge() {
    if (isReference()) {
      final VersionInfo refVersion = (VersionInfo) getCheckedRef(VersionInfo.class, "VersionInfo");
      return refVersion.merge();
    }
    Reference currentRef = this.getExtends();
    if (currentRef == null) {
      return this;
    }
    final Vector<VersionInfo> stack = new Vector<>(5);
    stack.addElement(this);
    while (currentRef != null) {
      final Object obj = currentRef.getReferencedObject(getProject());
      if (obj instanceof VersionInfo) {
        VersionInfo current = (VersionInfo) obj;
        if (current.isReference()) {
          current = (VersionInfo) current.getCheckedRef(VersionInfo.class, "VersionInfo");
        }
        if (stack.contains(current)) {
          throw this.circularReference();
        }
        stack.addElement(current);
        currentRef = current.getExtends();
      } else {
        throw new BuildException("Referenced element " + currentRef.getRefId() + " is not a versioninfo.");
      }
    }
    return new VersionInfo(stack);
  }
30595
def merge_with(self, other):
        """"""
        result = ValuesAggregation()
        result.total = self.total + other.total
        result.count = self.count + other.count
        result.min = min(self.min, other.min)
        result.max = max(self.max, other.max)
        return result
640762
public JMCountMap<V> merge(JMCountMap<V> jmCountMap) {
        synchronized (countMap) {
            jmCountMap.forEach((value, count) -> countMap
                    .put(value, getCount(value) + count));
            return this;
        }
    }
1281831
def _merge_default_values(self):
        """"""
        values = self._get_default_values()
        for key, value in values.items():
            if not self.data.get(key):
                self.data[key] = value
250385
def merge(self, other):
        """"""
        log.debug('Merging: %s and %s' % (self.serialize(), other.serialize()))
        for k in self.keys():
            for new_item in other[k]:
                if new_item not in self[k]:
                    self[k].append(new_item)
        log.debug('Result: %s' % self.serialize())
        return self
1361783
def merge(items, amap, load=False):

    """"""

    for target, source in items:
        if amap.get(target):
            logger.warn('overwriting {0}'.format(target))
        if load:
            amap[target] = open(source).read()
        else:
            amap[target] = source
1291559
function mergeComponentData (attrValue, extraData) {
  // Extra data not defined, just return attrValue.
  if (!extraData) { return attrValue; }

  // Merge multi-property data.
  if (extraData.constructor === Object) {
    return utils.extend(extraData, utils.styleParser.parse(attrValue || {}));
  }

  // Return data, precendence to the defined value.
  return attrValue || extraData;
}
96714
def inner(self):
        
        self.get_collections_data()

        inner_join = self.merge_join_docs(set(self.collections_data['left'].keys()) & set(
            self.collections_data['right'].keys()))

        return inner_join