Removes a entry from the semantic data vividict.

        :param list path_as_list: The path of the vividict to delete.
        :return: removed value or dict
172925
def remove_semantic_data(self, path_as_list):
        
        if len(path_as_list) == 0:
            raise AttributeError("The argument path_as_list is empty but but the method remove_semantic_data needs a "
                                 "valid path to remove a vividict item.")
        target_dict = self.get_semantic_data(path_as_list[0:-1])
        removed_element = target_dict[path_as_list[-1]]
        del target_dict[path_as_list[-1]]
        return removed_element
504736
def clean_value(self):
        
        result = []
        for mdl in self:
            result.append(super(ListNode, mdl).clean_value())
        return result
933411
def strip_prefix_from_list(list, strip):
    
    for i in range(len(list)):
        list[i] = strip_prefix(list[i], strip)
726485
def remove(self, value, count=1):
        
        count = self.client.lrem(self.name, value, num=count)
        if not count:
            raise ValueError("%s not in list" % value)
        return count
404786
def response_path_as_list(path: ResponsePath) -> List[Union[str, int]]:
    
    flattened: List[Union[str, int]] = []
    append = flattened.append
    curr: Optional[ResponsePath] = path
    while curr:
        append(curr.key)
        curr = curr.prev
    return flattened[::-1]
760630
def pathstrip(path, n):
  
  pathlist = [path]
  while os.path.dirname(pathlist[0]) != b'':
    pathlist[0:1] = os.path.split(pathlist[0])
  return b'/'.join(pathlist[n:])
1035803
def filelist_prune(self, at_data, *args, **kwargs):
        

        b_status    = True
        l_file      = []
        str_path    = at_data[0]
        al_file     = at_data[1]
        if len(self.str_extension):
            al_file = [x for x in al_file if self.str_extension in x]

        if len(al_file):
            al_file.sort()
            l_file      = al_file
            b_status    = True
        else:
            self.dp.qprint( "No valid files to analyze found in path %s!" % str_path, 
                            comms = 'error', level = 3)
            l_file      = None
            b_status    = False
        return {
            'status':   b_status,
            'l_file':   l_file
        }
1008216
def path_entry(self, path):
        
        if path[0] != '/':
            return None
        path_parts = path.split('/')
        # Note that here the first element will be '' because it's before the
        # first separator.  That's OK, the join puts it back together.
        directory = '/'.join(path_parts[:-1])
        name = path_parts[-1]
        if directory not in self.listings:
            return None
        if name not in self.listings[directory]['entries']:
            return None
        return self.listings[directory]['entries'][name]
634938
def remove(self, path):
        

        entry = self.find(path)

        if not entry:
            raise ValueError("%s does not exists" % path)

        if entry.type == 'root storage':
            raise ValueError("can no remove root entry")

        if entry.type == "storage" and not entry.child_id is None:
            raise ValueError("storage contains children")

        entry.pop()

        # remove stream data
        if entry.type == "stream":
            self.free_fat_chain(entry.sector_id, entry.byte_size < self.min_stream_max_size)

        self.free_dir_entry(entry)
99499
private ModelNode removeAliasFromList(ModelNode list, String alias) throws OperationFailedException {

        // check for empty string
        if (alias == null || alias.equals(""))
            return list ;

        // check for undefined list (AS7-3476)
        if (!list.isDefined()) {
            throw InfinispanMessages.MESSAGES.cannotRemoveAliasFromEmptyList(alias);
        }

        ModelNode newList = new ModelNode() ;
        List<ModelNode> listElements = list.asList();

        for (ModelNode listElement : listElements) {
            if (!listElement.asString().equals(alias)) {
                newList.add().set(listElement);
            }
        }
        return newList ;
    }
842569
def remove_list_member(self, list_id, user_id):
        
        return List(tweepy_list_to_json(self._client.remove_list_member(list_id=list_id, user_id=user_id)))
300678
def flatten_path_lists(env_dict, env_root=None):
    """"""
    for (key, val) in env_dict.items():
        # Lists are presumed to be path components and will be turned back
        # to strings
        if isinstance(val, list):
            env_dict[key] = os.path.join(env_root, os.path.join(*val)) if (env_root and not os.path.isabs(os.path.join(*val))) else os.path.join(*val)  # noqa pylint: disable=line-too-long
    return env_dict
172585
def remove_object_from_list(self, obj, list_element):
        
        list_element = self._handle_location(list_element)

        if isinstance(obj, JSSObject):
            results = [item for item in list_element.getchildren() if
                       item.findtext("id") == obj.id]
        elif isinstance(obj, (int, basestring)):
            results = [item for item in list_element.getchildren() if
                       item.findtext("id") == str(obj) or
                       item.findtext("name") == obj]

        if len(results) == 1:
            list_element.remove(results[0])
        elif len(results) > 1:
            raise ValueError("There is more than one matching object at that "
                             "path!")
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;
}
664774
def add_semantic_data(self, path_as_list, value, key):
        
        assert isinstance(key, string_types)
        target_dict = self.get_semantic_data(path_as_list)
        target_dict[key] = value
        return path_as_list + [key]
475403
def save_list(lst, path):
    

    with open(path, 'wb') as out:
        lines = []
        for item in lst:
            if isinstance(item, (six.text_type, six.binary_type)):
                lines.append(make_str(item))
            else:
                lines.append(make_str(json.dumps(item)))
        out.write(b'\n'.join(lines) + b'\n')
812371
def handle_unset_list(self, line: str, position: int, tokens: ParseResults) -> ParseResults:
        
        for key in tokens['values']:
            if key in {BEL_KEYWORD_EVIDENCE, BEL_KEYWORD_SUPPORT}:
                self.evidence = None
            else:
                self.validate_unset_command(line, position, key)
                del self.annotations[key]

        return tokens