def add_link(self, source_option, target_option, allow_stream=True):
        if not source_option.source == self._source._tool:
            raise ValueError("Linked source options.source != edge.source")
        if not target_option.source == self._target._tool:
            raise ValueError("Linked target option.source != edge.target")

        if source_option.is_stream() and not target_option.streamable:
            raise jip.tools.ValidationError(
                self._target._tool,
                "You are trying to establish a link between\n"
                "%s and %s, using %s.%s delegated to %s.%s.\n"
                "The source is a <<STREAM>> but the target "
                "does not accept streamed input!\n"
                "Try to set file name as output for %s." %
                (self._source, self._target,
                 self._source, source_option.name,
                 self._target, target_option.name,
                 self._source))

        link = (source_option, target_option,
                allow_stream and source_option.streamable and
                target_option.streamable)
        log.debug("Add link on edge: %s->%s [%s->%s Stream:%s]",
                  self._source, self._target,
                  source_option.name, target_option.name, link[2])
        self._links.add(link)
        return link
Create an option link between the source option and the target
dataset/ETHPy150Open thasso/pyjip/jip/pipelines.py/Edge.add_link