Assemble results with no johns.  i.e. a simple collection of one type of objects
968371
protected function assembleSimpleResult($act, $rc, array $items, $ctx) {
		$assembler = $act->getResultAssembler();
		if( $assembler === null ) {
			throw new Exception("No result assembler specified by ".get_class($act));
		}
		
		return $assembler->assembleResult(
			new EarthIT_CMIPREST_StorageResult($rc, array('root'=>array()), array('root'=>$items)),
			$act, $ctx );
	}
1332459
def unpickle(self, parent):
        """"""
        self.parent = parent
        self._unpickle_collection(self.members)
        self._unpickle_collection(self.dependencies)
        self._unpickle_collection(self.types)
        self._unpickle_collection(self.executables)
        self._unpickle_collection(self._parameters)
        self.unpickle_docs()
108449
function combine(...objects) {
  inv(Array.isArray(objects) && objects.length > 0,
    'You must pass at least one object to instantiate'
  );

  inv(objects.every(isObj),
    'Expecting only plain objects as parameter(s)'
  );

  return assign({}, ...objects);
}
421934
def assemble(self):
        """"""
        first_block = ray.get(self.objectids[(0, ) * self.ndim])
        dtype = first_block.dtype
        result = np.zeros(self.shape, dtype=dtype)
        for index in np.ndindex(*self.num_blocks):
            lower = DistArray.compute_block_lower(index, self.shape)
            upper = DistArray.compute_block_upper(index, self.shape)
            result[[slice(l, u) for (l, u) in zip(lower, upper)]] = ray.get(
                self.objectids[index])
        return result
1320532
private Collection<HColumn<String, byte[]>> createColumnSet(Object obj) {
    Map<String, HColumn<String, byte[]>> map = createColumnMap(obj);
    if (null != map) {
      return map.values();
    } else {
      return null;
    }
  }
394541
def organize_objects(self):
        """"""

        def _render_children(obj):
            for child in obj.children_strings:
                child_object = self.objects.get(child)
                if child_object:
                    obj.item_map[child_object.plural].append(child_object)
                    obj.children.append(child_object)

            for key in obj.item_map:
                obj.item_map[key].sort()

        def _recurse_ns(obj):
            if not obj:
                return
            namespace = obj.top_namespace
            if namespace is not None:
                ns_obj = self.top_namespaces.get(namespace)
                if ns_obj is None or not isinstance(ns_obj, DotNetNamespace):
                    for ns_obj in self.create_class(
                        {"uid": namespace, "type": "namespace"}
                    ):
                        self.top_namespaces[ns_obj.id] = ns_obj
                if obj not in ns_obj.children and namespace != obj.id:
                    ns_obj.children.append(obj)

        for obj in self.objects.values():
            _render_children(obj)
            _recurse_ns(obj)

        # Clean out dead namespaces
        for key, ns in self.top_namespaces.copy().items():
            if not ns.children:
                del self.top_namespaces[key]

        for key, ns in self.namespaces.items():
            if not ns.children:
                del self.namespaces[key]
97174
def assert_no_union(self, collection1, collection2,
                        failure_message='Expected no overlap between collections: "{}" and "{}"'):
        
        assertion = lambda: len(set(collection1).intersection(set(collection2))) == 0
        failure_message = unicode(failure_message).format(collection1, collection2)
        self.webdriver_assert(assertion, failure_message)
1213278
function(data) {
    // Empty data
    if (_.isEmpty(data)) {
      // Return [] or null
      return _.isArray(data) ? data : null;
    }

    // Array data
    if (_.isArray(data)) {
      return data.map(obj => this._toJSON(obj));
    }

    // Single data
    if (typeof data.toJSON === 'function') {
      return data.toJSON();
    }

    return data;
  }
325550
def include_none?(*items)
      items = items.first if items.length == 1 && items.first.kind_of?(Array)
      (self & items).empty?
    end
337426
private List<?> toList(Object results)
    {
        if (results instanceof Object[])
        {
            return Arrays.asList( (Object[]) results );
        }
        if (results instanceof Collection)
        {
            return new ArrayList<Object>( (Collection<?>) results );
        }
        return null;
    }
627595
function assembleAttrsFromServer(seedData, formObjectClass) {
  // Early return when there was no serialized object provided by the server
  if (!seedData) { return {} }

  // Otherwise assemble main and submodels' fields
  let attrs = merge({}, seedData.fields, seedData.errors)
  // TODO: reenable this, but consider there might be ids/ id arrays in there
  // for (let submodel of formObjectClass.submodels) {
  //   if (seedData.fields[submodel]) {
  //     let submodelData = seedData.fields[submodel]
  //     attrs[submodel] = merge({}, submodelData.fields, submodelData.errors)
  //   }
  // }
  return attrs
}
1070991
def collect(coro, index, results,
            preserve_order=False,
            return_exceptions=False):
    
    result = yield from safe_run(coro, return_exceptions=return_exceptions)

    if preserve_order:
        results[index] = result
    else:
        results.append(result)
557879
function cleanUpNoComboFiles(flist){
	var a = [];
	flist.forEach(function(item){
		if(!/nocombo=true/i.test(item)){
			a.push(item);
		}
	});
	return a;
}
286858
def p_NonAnyType_object(p):
  """"""
  p[0] = helper.unwrapTypeSuffix(model.SimpleType(
    type=model.SimpleType.OBJECT), p[2])
1260260
public static <T> CollectionUpdateResult<T> noop(T result) {
    return new CollectionUpdateResult<>(Status.NOOP, result);
  }
827594
@SuppressWarnings("all")
    private static <T> T toNonCollectionType(Object data, Class<T> nonCollectionType) {
        if (Collection.class.isAssignableFrom(nonCollectionType)) {
            throw new RuntimeException("API使用错误，本方法不支持将目标对象转为非集合类型");
        }
        if (data == null) {
            return Defaults.defaultValue(nonCollectionType);
        }
        if (data.getClass().isArray()) {
            data = ArrayUtil.toList(data);
        }
        if (data instanceof Collection) {
            Collection collection = (Collection) data;
            if (nonCollectionType == String.class) {
                return (T) JSON.toJSONString(collection);
            }
            if (collection.isEmpty()) {
                return null;
            }
            if (collection.size() >= 2) {
                LOG.warn(new Throwable(String.format("集合 【 %s 】  的元素个数不只一个,我们只取出第一个做转换", data)));
            }
            for (Object element : collection) {
                LOG.debug("集合的第一个元素会被转为目标类型");
                return transferNonCollection(element, nonCollectionType);
            }
        } else {
            return transferNonCollection(data, nonCollectionType);
        }
        throw castFailedException(data, nonCollectionType);
    }
807202
def serialize(objects=None):
    

    return serializers.serialize(
        "json",
        objects,
        ensure_ascii=True,
        use_natural_foreign_keys=True,
        use_natural_primary_keys=False,
    )