"n">metric</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
        <span class="sd">"""</span>
<span class="sd">        Compute the score for each triplet.</span>

<span class="sd">        Parameters:</span>
<span class="sd">            graph (Graph): fact graph</span>
<span class="sd">            h_index (Tensor): indexes of head entities</span>
<span class="sd">            t_index (Tensor): indexes of tail entities</span>
<span class="sd">            r_index (Tensor): i