def _update_secondary_channels(self, p):
<EOL>if p.link_start:<EOL><INDENT>logger.debug("<STR_LIT>".format(<EOL>p.template, p.link_start))<EOL>for l in p.link_start:<EOL><INDENT>if l in self.secondary_channels:<EOL><INDENT>self.secondary_channels[l][p.lane] = {"<STR_LIT:p>": p, "<STR_LIT:end>": []}<EOL><DEDENT>else:<EOL><INDENT>self.secondary_channels[l] = {p.lane: {"<STR_LIT:p>": p, "<STR_LIT:end>": []}}<EOL><DEDENT><DEDENT><DEDENT>if p.link_end:<EOL><INDENT>logger.debug("<STR_LIT>".format(<EOL>p.template, p.link_end))<EOL>for l in p.link_end:<EOL><INDENT>parent_forks = self._get_fork_tree(p.lane)<EOL>if l["<STR_LIT>"].startswith("<STR_LIT>"):<EOL><INDENT>self._set_implicit_link(p, l)<EOL>continue<EOL><DEDENT>if l["<STR_LIT>"] not in self.secondary_channels:<EOL><INDENT>continue<EOL><DEDENT>for lane in parent_forks:<EOL><INDENT>if lane in self.secondary_channels[l["<STR_LIT>"]]:<EOL><INDENT>self.secondary_channels[<EOL>l["<STR_LIT>"]][lane]["<STR_LIT:end>"].append("<STR_LIT:{}>".format(<EOL>"<STR_LIT>".format(l["<STR_LIT>"], p.pid)))<EOL><DEDENT><DEDENT><DEDENT><DEDENT>logger.debug("<STR_LIT>".format(<EOL>p.template, self.secondary_channels))<EOL>
Given a process, this method updates the
        :attr:`~Process.secondary_channels` attribute with the corresponding
        secondary inputs of that channel.

        The rationale of the secondary channels is the following:

            - Start storing any secondary emitting channels, by checking the
              `link_start` list attribute of each process. If there are
              channel names in the link start, it adds to the secondary
              channels dictionary.
            - Check for secondary receiving channels, by checking the
              `link_end` list attribute. If the link name starts with a
              `__` signature, it will created an implicit link with the last
              process with an output type after the signature. Otherwise,
              it will check is a corresponding link start already exists in
              the at least one process upstream of the pipeline and if so,
              it will update the ``secondary_channels`` attribute with the
              new link.

        Parameters
        ----------
        p : flowcraft.Process.Process