Implementation of omit that recurses. This tests the same keys at every level of dict and in lists
    :param omit_props:
    :param dct:
    :return:
338884
def omit_deep(omit_props, dct):
    

    omit_partial = omit_deep(omit_props)

    if isinstance(dict, dct):
        # Filter out keys and then recurse on each value that wasn't filtered out
        return map_dict(omit_partial, compact_dict(omit(omit_props, dct)))
    if isinstance((list, tuple), dct):
        # run omit_deep on each value
        return map(omit_partial, dct)
    # scalar
    return dct
675695
def _drop_empty_props(self, item):
        
        if isinstance(item, list):
            return [self._drop_empty_props(i) for i in item]
        if isinstance(item, dict):
            return {
                k: self._drop_empty_props(v)
                for k, v in item.items() if v != ''
            }
        return item
571396
function omitFromArray(array, paths) {
  let indicesToRemove = [];

  const newCollection = reduce(
    (deeplyNestedOmittedCollection, path) => {
      if (path.length > 1) {
        return omitNested(path, deeplyNestedOmittedCollection, true);
      }

      indicesToRemove = [...indicesToRemove, ...path[0]];

      return deeplyNestedOmittedCollection;
    },
    array,
    paths
  );

  return removeIndicesFromArray(indicesToRemove, newCollection);
}
962412
def clean_dictkeys(ddict, exclusions=None):
    
    exclusions = [] if exclusions is None else exclusions

    if not isinstance(ddict, dict):
        return {}

    for key in list(ddict.keys()):
        if [incl for incl in exclusions if incl in key]:
            data = ddict.pop(key)
            clean_key = exclude_chars(key, exclusions)

            if clean_key:
                if clean_key in ddict:
                    ddict[clean_key] = force_list(ddict[clean_key])
                    add_element(ddict, clean_key, data)
                else:
                    ddict[clean_key] = data

        # dict case
        if isinstance(ddict.get(key), dict):
            ddict[key] = clean_dictkeys(ddict[key], exclusions)

        # list case
        elif isinstance(ddict.get(key), list):
            for row in ddict[key]:
                if isinstance(row, dict):
                    row = clean_dictkeys(row, exclusions)

    return ddict
122453
def purge_dict(idict):
    
    odict = {}
    for key, val in idict.items():
        if is_null(val):
            continue
        odict[key] = val
    return odict
483801
def _strip_empty_keys(self, params):
        
        keys = [k for k, v in params.items() if v == '']
        for key in keys:
            del params[key]
1060239
def _accumulate_props(dest_props, src_props):
    
    props_size = 0
    if src_props:
        for k, v in src_props.items():
            if v is not None:
                props_size += len(k) + _sizeof(v)
                dest_props[k] = v
    return props_size
997610
def _generate_filtered_properties(self, props, filters):
        
        # by default no properties are returned
        if props and filters:
            return (props
                    if '*' in filters
                    else dict(((k, v) for k, v in props.items() if k in filters)))
92138
def _is_excluded(self, prop, info_dict):
        
        if prop.key in BLACKLISTED_KEYS:
            return True

        if info_dict.get('exclude', False):
            return True

        if prop.key in self.excludes:
            return True

        if self.includes and prop.key not in self.includes:
            return True

        return False
283728
def _remove_keys_from_dict_with_nonunique_values(self, d, log_fh=None, log_outprefix=None):
        ''''''
        value_counts = collections.Counter(d.values())
        new_d = {}
        writing_log_file = None not in [log_fh, log_outprefix]

        for key in d:
            if value_counts[d[key]] == 1:
                new_d[key] = d[key]
            elif writing_log_file:
                print(log_outprefix, 'Reject because non-unique:', d[key], sep='\t', file=log_fh)

        return new_d
71525
def prop_eq_or_in_or(default, key, value, dct):
    
    return has(key, dct) and \
           (dct[key] == value if key in dct else (
               dct[key] in value if isinstance((list, tuple), value) and not isinstance(str, value)
               else default
           ))
68788
def _delete_keys(dct, keys):
    
    c = deepcopy(dct)
    assert isinstance(keys, list)
    for k in keys:
        c.pop(k)
    return c
927662
def get_flattened(dct, names, path_joiner="_"):
  
  new_dct = dict()
  for key, val in dct.items():
    if key in names:
      child = {path_joiner.join(k): v for k, v in flatten_dict(val, (key, ))}
      new_dct.update(child)
    else:
      new_dct[key] = dct[key]
  return new_dct
286638
func omit(key string, values []string) bool {
	return len(key) == 0 || len(values) == 0 || len(values[0]) == 0 || sensitive.FindString(key) != ""
}
369483
function omitFieldsToMongo(omitFields) {
    if (!omitFields) return null
    var hash = {}
    omitFields.split(',').forEach(function(omitField) {
        hash[omitField.trim()] = 0
    })
    return hash
}
392073
def omit(self):
        """"""
        self._omit = self.lib.iperf_get_test_omit(self._test)
        return self._omit
403730
def _clear_ignore(endpoint_props):
    '''
    
    '''
    return dict(
        (prop_name, prop_val)
        for prop_name, prop_val in six.iteritems(endpoint_props)
        if prop_name not in _DO_NOT_COMPARE_FIELDS and prop_val is not None
    )