make the consumer_state ready for the next MC path

        :param int path_num:
970405
def initialize_path(self, path_num=None):
        
        for c in self.consumers:
            c.initialize_path(path_num)
        self.state = [c.state for c in self.consumers]
1117400
def update_machine_state(state_path):
    """"""
    charmhelpers.contrib.templating.contexts.juju_state_to_yaml(
        salt_grains_path)
    subprocess.check_call([
        'salt-call',
        '--local',
        'state.template',
        state_path,
    ])
804446
def maybe_get_next_message(self):
        
        if self.pending:
            self.ioloop.add_callback(
                self.invoke_consumer, self.pending.popleft())
1115332
function pathParamMiddleware (req, res, next, value, name) {
    if (req.pathParams) {
      // Path parameters have already been parsed by
      req.params[name] = req.pathParams[name] || req.params[name];
    }

    next();
  }
677974
def prepare_attr_for_state(txn, path_only=False):
    
    assert get_type(txn) == ATTRIB
    txn_data = get_payload_data(txn)
    nym = txn_data[TARGET_NYM]
    attr_type, attr_key, value = parse_attr_txn(txn_data)
    path = make_state_path_for_attr(nym, attr_key, attr_type == HASH)
    if path_only:
        return path
    hashed_value = hash_of(value) if value else ''
    seq_no = get_seq_no(txn)
    txn_time = get_txn_time(txn)
    value_bytes = encode_state_value(hashed_value, seq_no, txn_time)
    return attr_type, path, value, hashed_value, value_bytes
209758
def _TryToStartNextPathspec(self):
    """"""

    # Nothing to do here.
    if self.state.maximum_pending_files <= len(self.state.pending_files):
      return

    if self.state.maximum_pending_files <= len(self.state.pending_hashes):
      return

    try:
      index = self.state.next_pathspec_to_start
      pathspec = self.state.indexed_pathspecs[index]
      self.state.next_pathspec_to_start = index + 1
    except IndexError:
      # We did all the pathspecs, nothing left to do here.
      return

    # Add the file tracker to the pending hashes list where it waits until the
    # hash comes back.
    self.state.pending_hashes[index] = {"index": index}

    # First state the file, then hash the file.

    # TODO(hanuszczak): Support for old clients ends on 2021-01-01.
    # This conditional should be removed after that date.
    if self.client_version >= 3221:
      stub = server_stubs.GetFileStat
      request = rdf_client_action.GetFileStatRequest(pathspec=pathspec)
      request_name = "GetFileStat"
    else:
      stub = server_stubs.StatFile
      request = rdf_client_action.ListDirRequest(pathspec=pathspec)
      request_name = "StatFile"

    self.CallClient(
        stub,
        request,
        next_state="StoreStat",
        request_data=dict(index=index, request_name=request_name))

    request = rdf_client_action.FingerprintRequest(
        pathspec=pathspec, max_filesize=self.state.file_size)
    request.AddRequest(
        fp_type=rdf_client_action.FingerprintTuple.Type.FPT_GENERIC,
        hashers=[
            rdf_client_action.FingerprintTuple.HashType.MD5,
            rdf_client_action.FingerprintTuple.HashType.SHA1,
            rdf_client_action.FingerprintTuple.HashType.SHA256
        ])

    self.CallClient(
        server_stubs.HashFile,
        request,
        next_state="ReceiveFileHash",
        request_data=dict(index=index))
62600
def add_to_path(p):
    '''
        
    '''
    old_path = sys.path
    if p not in sys.path:
        sys.path = sys.path[:]
        sys.path.insert(0, p)
    try:
        yield
    finally:
        sys.path = old_path
320827
def subvol_quota(self, path, limit):
        
        args = {
            'path': path,
            'limit': limit,
        }

        self._subvol_quota_chk.check(args)

        self._client.sync('btrfs.subvol_quota', args)
964779
def keep_path(self, path):
        
        if len(path.addr_trace) < 2:
            return True

        return self.should_take_exit(path.addr_trace[-2], path.addr_trace[-1])
899833
def post_async(self, path, params=None):
        
        request = Post(self._get_next_id(), path, params)
        request.set_callback(self._q.put)
        future = self._dispatch_request(request)
        return future
547157
public static WatchMonitor createModify(Path path, int maxDepth, Watcher watcher) {
		final WatchMonitor watchMonitor = create(path, maxDepth, WatchMonitor.ENTRY_MODIFY);
		watchMonitor.setWatcher(watcher);
		return watchMonitor;
	}
998955
def set(self, *path):
        
        self.path = [self.channel_name]
        self.path.extend(list(path))
1143833
def load_state(cls, path:PathOrStr, state:dict) -> 'LabelList':
        ""
        x = state['x_cls']([], path=path, processor=state['x_proc'], ignore_empty=True)
        y = state['y_cls']([], path=path, processor=state['y_proc'], ignore_empty=True)
        res = cls(x, y, tfms=state['tfms'], tfm_y=state['tfm_y'], **state['tfmargs']).process()
        if state.get('tfms_y', False):    res.tfms_y    = state['tfms_y']
        if state.get('tfmargs_y', False): res.tfmargs_y = state['tfmargs_y']
        if state.get('normalize', False): res.normalize = state['normalize']
        return res
1332004
protected void prepareMandArcDetection() {
		// RECYCLING ccTp is used to model the compressed path
		ISet nei;
		for (int i = 0; i < n; i++) {
			ccTp[i] = -1;
		}
		useful.clear();
		useful.set(0);
		int k = 1;
		useful.set(k);
		ccTp[k] = k;
		int first = 0;
		int last = first;
		fifo[last++] = k;
		while (first < last) {
			k = fifo[first++];
			nei = Tree.getNeighOf(k);
			for (int s : nei) {
				if (ccTp[s] == -1) {
					ccTp[s] = k;
					map[s][k] = map[k][s] = -1;
					if (!useful.get(s)) {
						fifo[last++] = s;
						useful.set(s);
					}
				}
			}
		}
	}
248025
async def reseed_init(self, next_seed: str = None) -> str:
        

        LOGGER.debug('Wallet.reseed_init >>> next_seed: [SEED]')

        if not self.handle:
            LOGGER.debug('Wallet.reseed_init <!< Wallet %s is closed', self.name)
            raise WalletState('Wallet {} is closed'.format(self.name))

        rv = await did.replace_keys_start(self.handle, self.did, json.dumps({'seed': next_seed} if next_seed else {}))
        LOGGER.debug('Wallet.reseed_init <<< %s', rv)
        return rv
1194343
def _nvram_changed(self, path):
        
        log.debug("NVRAM changed: {}".format(path))
        self.save_configs()
        self.updated()
265097
def _run_parallel_process(self, start_path, stop_path, queue):
        
        process_num = int(current_process().name.split('-', 2)[1])
        self._run_process(start_path, stop_path, process_num)
        queue.put(self.consumer.put())