Helper function to remove the branch and version information from the given value,
    which could be a single object or a list.
2412
def _strip_value(value, lookup='exact'):
    
    if lookup == 'in':
        stripped_value = [_strip_object(el) for el in value]
    else:
        stripped_value = _strip_object(value)
    return stripped_value
1121130
def clean(self, value):
        """"""

        for parameter_obj in self.types:
            try:
                return parameter_obj.clean(value)
            except ParameterNotValidError:
                continue

        raise ParameterNotValidError
1161079
def compare_version(value):
    

    # extract parts from value
    import re
    res = re.match(r'(<|<=|==|>|>=)(\d{1,2}\.\d{1,2}(\.\d{1,2})?)$',
                   str(value).strip())
    if not res:
        return False
    operator, value, _ = res.groups()

    # break into pieces
    value = tuple(int(x) for x in str(value).split('.'))
    if len(value) < 3:
        value += (0,)

    version = __version_info__

    if operator in ('<', '<='):
        if version < value:
            return True

        if operator != '<=':
            return False

    elif operator in ('>=', '>'):
        if version > value:
            return True

        if operator != '>=':
            return False

    return value == version
1225604
def __find_and_remove_value(list, compare):
    """"""
    # next throws if there are no matches
    try:
        found = next(value for value in list
                     if value['name'] == compare['name'] and value['switch'] ==
                     compare['switch'])
    except:
        return None

    list.remove(found)

    return found
984253
def clean(self, value):
        """"""

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

        raise ParameterNotValidError
60005
def _clean(self, value):
        
        if value:
            value = str(value).replace('/library/metadata/', '')
            value = value.replace('/children', '')
            return value.replace(' ', '-')[:20]
228306
def clean(source):
    

    if isinstance(source, dict):
        for key, value in source.items():
            if key == "Fn::Join":
                return convert_join(value)
            else:
                source[key] = clean(value)

    elif isinstance(source, list):
        return [clean(item) for item in source]

    return source
1097511
def _remove_texttuple(self, pos):
        """"""
        for i, (old_x, old_y, s, old_cs, d) in enumerate(self.value):
            if (old_x, old_y, old_cs) == pos:
                self.value.pop(i)
                return
        raise ValueError("{0} not found!".format(pos))
468759
public void removeValue(V value) {

        Set<K> keys = m_reverseMap.removeAll(value);
        for (K key : keys) {
            m_forwardMap.remove(key);
        }
    }
851341
protected void removeVersionable() throws RepositoryException, ConstraintViolationException, VersionException
   {
      if (isNode())
      {
         NodeTypeDataManager ntManager = session.getWorkspace().getNodeTypesHolder();
         NodeData node = (NodeData)data;
         if (ntManager.isNodeType(Constants.MIX_VERSIONABLE, node.getPrimaryTypeName(), node.getMixinTypeNames()))
         {

            ItemData vhpd =
               dataManager.getItemData(node, new QPathEntry(Constants.JCR_VERSIONHISTORY, 1), ItemType.PROPERTY);
            if (vhpd != null && !vhpd.isNode())
            {
               String vhID = ValueDataUtil.getString(((PropertyData)vhpd).getValues().get(0));
               dataManager.removeVersionHistory(vhID, null, data.getQPath());
            }
            else
            {
               throw new RepositoryException("Version history not found for " + node.getQPath().getAsString());
            }
         }
      }
   }
1253023
def remove_value(self, name):
        """"""
        ns = self._get_reference_namespace(name)
        ns.pop(name)
1135624
protected String stripVersionFromName(String name, String version) {
        int versionBeginIndex = name.lastIndexOf("-" + version);
        if ( versionBeginIndex != -1) {
            return name.substring(0, versionBeginIndex) + name.substring(versionBeginIndex + version.length() + 1);
        } else {
            return name;
        }
    }
1139969
function cleanItem(value) {

        var newvalue = null;

        if (Array.isArray(value)) {

            if (value.indexOf("consumer") > -1) {
                value.forEach(function (key2) {
                    ids[key2] = "roles";
                });
            }

            newvalue = [];

            value.forEach(function (item) {
                newvalue.push(cleanItem(item));
            })

            return newvalue;
        }

        if ((typeof value !== "object") || (value == null)) {
            return value;
        }

        Object.keys(value).forEach(function (key) {

            if (key == "orgs") {
                Object.keys(value[key]).forEach(function (key2) {
                    ids[key2] = "orgs";
                });
            }

            if (key == "_temp") {
                return;
            } else if (key == "encData" || key == "signature" || key == "encPrivateKey" || key == "publicKey") {
                newvalue = newvalue || {};
                if (typeof newvalue !== "object") throw new Error("Not Object" + key)
                newvalue[key] = "..."
            } else {
                newvalue = newvalue || {};
                if (typeof newvalue !== "object") throw new Error("Not Object" + key)
                newvalue[key] = cleanItem(value[key])
            }
        });

        return newvalue;
    }
534853
def remove(self, value):
		
		try:
			index = self._dict[value]
		except KeyError:
			raise ValueError('Value "%s" is not present.')
		else:
			del self[index]
507818
def clean(self, value):
        
        value = super(ListField, self).clean(value)
        if value is not None:
            return map(self.itemspec.clean, value)
1199982
def remove(self, value):
        
        self._set.remove(value)
        self._list.remove(value)
974174
function removeKeyFromList(list, key, value) {
    for (var i = list.length - 1; i >= 0; i--) {
        if (list[i][key] == value) {
            return list.splice(i, 1); // remove from array
        }
    }
    return false;
}