Negative Edge Sampling

I come across one of the DGL modules dgl.contrib.sampling, in particular the EdgeSampler function. From my understanding, it generates a sampler used for link prediction, which have both positive and negative edges in a subgraph. Is there any detail example where i could reference from as i could not understand the samples generated from the sampler? I would like to know if this could also be used as an alternative to the current RGCN link prediction code, which currently consists of several steps for the negative sampling section.

Thank you.

Here is an example using EdgeSampler:

This sampler is initially designed for knowledge graph embedding.
For RGCN link prediction example, EdgeSampler can be used.