Normalizes a raw collection (not API resources).
778767
private function normalizeRawCollection(iterable $object, ?string $format, array $context): array
    {
        $data = [];
        foreach ($object as $index => $obj) {
            $data[$index] = $this->normalizer->normalize($obj, $format, $context);
        }

        return $data;
    }
771415
def normalize(self, mag=1.):
        

        def f(dataset, s, null, mag):
            dataset[s] -= null
            dataset[s] /= mag

        if self.signed:
            mag = self.mag() / mag
        else:
            mag = self.max() / mag
        self.chunkwise(f, null=self.null, mag=mag)
        self._null = 0
220253
def normalize(template_dict):
        
        resources = template_dict.get(RESOURCES_KEY, {})

        for logical_id, resource in resources.items():
            resource_metadata = resource.get(METADATA_KEY, {})
            asset_path = resource_metadata.get(ASSET_PATH_METADATA_KEY)
            asset_property = resource_metadata.get(ASSET_PROPERTY_METADATA_KEY)

            ResourceMetadataNormalizer._replace_property(asset_property, asset_path, resource, logical_id)
239002
def normalize(expr):
    """"""
    lhs = normalize(expr.lhs)
    rhs = normalize(expr.rhs)
    return type(expr)(lhs, rhs, start=lhs.start, end=rhs.end)
1347053
def normalize_bboxes(bboxes, rows, cols):
    """"""
    return [normalize_bbox(bbox, rows, cols) for bbox in bboxes]
867239
def ecs_tag_normalize(resources):
    """"""
    for r in resources:
        if 'tags' in r:
            r['Tags'] = [{'Key': t['key'], 'Value': t['value']} for t in r['tags']]
            r.pop('tags')
984253
def clean(self, value):
        """"""

        if isinstance(value, (list, tuple)):
            return [super(FeatureCollectionParameter, self).clean(x) for x in value]

        raise ParameterNotValidError
1222142
function normalize(loader, mods) {
	var modNames = (mods && !Array.isArray(mods)) ? [mods] : mods;

	return (modNames || []).map(function(moduleName) {
		return !_.isString(moduleName) ?
			Promise.resolve(moduleName) :
			loader.normalize(moduleName);
	});
}
88863
function normalizeMappings(mappings) {
        if (Array.isArray(mappings)) {
            return mappings.reduce(function (normalizedMappings, key) {
                normalizedMappings[key] = key;

                return normalizedMappings;
            }, {});
        }

        return mappings;
    }
390935
def _normalize_key(value):
  """"""
  if ndb is not None and isinstance(value, (ndb.Model, ndb.Key)):
    return None
  if getattr(value, "key", None):
    return value.key()
  elif isinstance(value, basestring):
    return datastore.Key(value)
  else:
    return value
69448
function normalize() {
    var array = flatten(arguments);

    /* The normalized structure */
    var normalized = {
      arguments: [],
      function: null
    };

    /* No elements in the array? Empty */
    if (! array.length) return normalized;

    /* Set the function only if it's the last element */
    if (typeof(array[array.length - 1]) === 'function') {
      normalized.function = array.splice(-1)[0];
    }

    /* Validate all arguments as strings */
    for (var i in array) {
      var argument = array[i];
      if (typeof(argument) === 'string') {
        normalized.arguments.push(argument);
      } else {
        throw new EsquireError("Found " + typeof(argument) + " but needed string: " + argument);
      }
    }

    /* Return our normalized structure */
    return normalized;
  }
743859
final public function normalize(): void
    {
        foreach ($this->props['items'] as &$item) {
            $item = array_replace($this->defaultItem, $item);
        }
        unset($item);
    }
917614
function normalize(obj) {
    var result = {}, fieldDefine, value;
    for(var field in options) {
      fieldDefine = options[field];
      value = obj[field];
      value = castValue(fieldDefine, value, obj);
      validateValue(fieldDefine, value, field);
      if(value != null) {
        // ignore null value
        result[field] = value;
      }
    }
    return result;
  }
199129
def to_raw(self, value, context=None):
        """"""
        if value is None:
            return None
        res = {}
        value = value.copy()
        errors = []
        for field in list(set(value) & set(self._fields)):
            schema = self._fields.get(field)
            name = schema.get_attr('name', field)
            try:
                res[name] = \
                    schema.to_raw(value.pop(field), context=context)
            except exceptions.ValidationErrors as ex:
                self._update_errors_by_exception(errors, ex, name)

        self._raise_exception_when_errors(errors, value)
        res.update(value)
        return res
450511
def raw(self, drop_collections = False):
        
        base_df = self._data
        if drop_collections is True:
            out_df = self._drop_collections(base_df)
        else:
            out_df = base_df
        return out_df
880551
function normalize(route) {
  if (is.not.array(route.path) && is.not.string(route.path)) {
    throw new Error(ERR_NORMALIZE_ROUTE);
  }

  if (is.array(route.method)) {
    /* If method is an array */
    route.method.forEach((method, i) => {
      route.method[i] = method.toLowerCase();
    });
  }

  /* If method is a string */
  if (is.string(route.method)) {
    route.method = route.method.toLowerCase();
  }

  return route;
}
450555
def normalize_dict(dictionary, **kwargs):
    
    result = {}
    if isinstance(dictionary, dict):
        keys = list(dictionary.keys())
        for key in keys:
            result[normalizer(key, **kwargs)] = normalize_dict(dictionary.get(key), **kwargs)
    else:
        result = dictionary
    return result