To assure that the pipe is correctly settled
        :param input_pipe:
        :param other_pipes: can be []
        :param output_pipe:
        :return:
546866
def make_assertions(input_pipe, other_pipes, output_pipe):
        
        assert isinstance(input_pipe, elements.InPypElement), 'Wrong input element type, want a InPypElement!'
        assert isinstance(output_pipe, elements.OutPypElement), 'Wrong output element type, want a OutPypElement!'
        for other_pipe in other_pipes:
            assert isinstance(other_pipe, elements.MidPypElement), 'Wrong middle element type, want a MidPypElement!'
622127
def chunk_on(pipeline, new_chunk_signal, output_type=tuple):
    '''  '''
    assert iterable(pipeline), 'chunks needs pipeline to be iterable'
    assert callable(new_chunk_signal), 'chunks needs new_chunk_signal to be callable'
    assert callable(output_type), 'chunks needs output_type to be callable'
    
    out = deque()
    for i in pipeline:
        if new_chunk_signal(i) and len(out): # if new chunk start detected
            yield output_type(out)
            out.clear()
        out.append(i)
    # after looping, if there is anything in out, yield that too
    if len(out):
        yield output_type(out)
866084
def cl_input(fname, unpack=True, anonpipe=True):
    
    try:
        manager = _get_storage_manager(fname)
    except ValueError:
        return fname

    return manager.cl_input(fname, unpack, anonpipe)
1301458
def _cast(self, _input, _output):
        

        if isenvelope(_output):
            _output, _flags, _options = _output.unfold()
        else:
            _flags, _options = [], {}

        if len(_flags):
            # TODO: parse flags to check constraints are respected (like not modified alone, etc.)

            if F_NOT_MODIFIED in _flags:
                return _input

            if F_INHERIT in _flags:
                if self._output_type is None:
                    self._output_type = concat_types(
                        self._input_type, self._input_length, self._output_type, len(_output)
                    )
                _output = _input + ensure_tuple(_output)

        if not self._output_type:
            if issubclass(type(_output), tuple):
                self._output_type = type(_output)

        return ensure_tuple(_output, cls=self._output_type)
56269
def get_inputs(self):
        
        start_p = [p for p in self.postorder() if not self.outgoing_edges(p)]
        self.log.debug('%s got input pipers %s' % (repr(self), start_p))
        return start_p
607781
def find_input(self, stream):
        

        for i, input_x in enumerate(self.inputs):
            if input_x[0].matches(stream):
                return i
246114
def iseof(self):
        """"""
        succ = windll.kernel32.PeekNamedPipe(
            self.conout_pipe, None, None, None, None, None
        )
        return not bool(succ)
1082854
def channel_is_settled(
            self,
            participant1: Address,
            participant2: Address,
            block_identifier: BlockSpecification,
            channel_identifier: ChannelID,
    ) -> bool:
        
        try:
            channel_state = self._get_channel_state(
                participant1=participant1,
                participant2=participant2,
                block_identifier=block_identifier,
                channel_identifier=channel_identifier,
            )
        except RaidenRecoverableError:
            return False
        return channel_state >= ChannelState.SETTLED
296687
def input_thread(log, stdin, is_alive, quit, close_before_term):
    

    done = False
    closed = False
    alive = True
    poller = Poller()
    poller.register_write(stdin)

    while poller and alive:
        changed = poller.poll(1)
        for fd, events in changed:
            if events & (POLLER_EVENT_WRITE | POLLER_EVENT_HUP):
                log.debug("%r ready for more input", stdin)
                done = stdin.write()

                if done:
                    poller.unregister(stdin)
                    if close_before_term:
                        stdin.close()
                        closed = True

        alive, _ = is_alive()

    while alive:
        quit.wait(1)
        alive, _ = is_alive()

    if not closed:
        stdin.close()
785852
def expect_output(output)
      if output.respond_to?(:~)
        assert_matching_output(output.to_s, all_output)
      else
        assert_partial_output(output, all_output)
      end
    end
27335
def create_pipe(backend_p):
        
        return Zsock(lib.zsys_create_pipe(byref(zsock_p.from_param(backend_p))), False)
181414
function inputArgs (outs, pipe, taskKey) {
  var args = []
  var inputPipesOf = inputPipes.bind(null, pipe)

  function populateArg (inputPipe) {
    var index = inputPipe[2] || 0
    var value = outs[inputPipe[0]]

    args[index] = value
  }

  inputPipesOf(taskKey).forEach(populateArg)

  return args
}
766300
def re_pipe(FlowRate, Diam, Nu):
    """"""
    #Checking input validity
    ut.check_range([FlowRate, ">0", "Flow rate"], [Diam, ">0", "Diameter"],
                   [Nu, ">0", "Nu"])
    return (4 * FlowRate) / (np.pi * Diam * Nu)
508234
def pipes(stream, *transformers):
    """"""
    for transformer in transformers:
        stream = stream.pipe(transformer)
    return stream
957603
def every_other(pipe, how_many=1):
    ''' 
    '''
    for i,x in zip(pipe, cycle(repeater([True,False], how_many))):
        if x:
            yield i
1282066
def _other_pipeline_samples(summary_file, cur_samples):
    
    cur_descriptions = set([s[0]["description"] for s in cur_samples])
    out = []
    if utils.file_exists(summary_file):
        with open(summary_file) as in_handle:
            for s in yaml.safe_load(in_handle).get("samples", []):
                if s["description"] not in cur_descriptions:
                    out.append(s)
    return out
1266298
def is_output(self, stream):
        

        for streamer in self.streamers:
            if streamer.selector.matches(stream):
                return True

        return False