def METHOD_NAME(self, minibatch, neg_pairs, etype=None):
    """Collates positive and negative samples into minibatch.
    Parameters
    ----------
    minibatch : MiniBatch
        The input minibatch, which contains positive node pairs, will be filled
        with negative information in this function.
    neg_pairs : Tuple[Tensor, Tensor]
        A tuple of tensors represents source-destination node pairs of
        negative edges, where negative means the edge may not exist in
        the graph.
    etype : str
        Canonical edge type.
    """
    pos_src, pos_dst = (
        minibatch.node_pairs[etype]
        if etype is not None
        else minibatch.node_pairs
    )
    neg_src, neg_dst = neg_pairs
    if self.output_format == LinkPredictionEdgeFormat.INDEPENDENT:
        pos_labels = torch.ones_like(pos_src)
        neg_labels = torch.zeros_like(neg_src)
        src = torch.cat([pos_src, neg_src])
        dst = torch.cat([pos_dst, neg_dst])
        labels = torch.cat([pos_labels, neg_labels])
        if etype is not None:
            minibatch.node_pairs[etype] = (src, dst)
            minibatch.labels[etype] = labels
        else:
            minibatch.node_pairs = (src, dst)
            minibatch.labels = labels
    else:
        if self.output_format == LinkPredictionEdgeFormat.CONDITIONED:
            neg_src = neg_src.view(-1, self.negative_ratio)
            neg_dst = neg_dst.view(-1, self.negative_ratio)
        elif (
            self.output_format == LinkPredictionEdgeFormat.HEAD_CONDITIONED
        ):
            neg_src = neg_src.view(-1, self.negative_ratio)
            neg_dst = None
        elif (
            self.output_format == LinkPredictionEdgeFormat.TAIL_CONDITIONED
        ):
            neg_dst = neg_dst.view(-1, self.negative_ratio)
            neg_src = None
        else:
            raise TypeError(
                f"Unsupported output format {self.output_format}."
            )
        if etype is not None:
            minibatch.negative_srcs[etype] = neg_src
            minibatch.negative_dsts[etype] = neg_dst
        else:
            minibatch.negative_srcs = neg_src
            minibatch.negative_dsts = neg_dst