ractVector{Int}, metric, _)
    return @inbounds evaluate(metric, view(x, :, idx[1]), view(y, :, idx[2])) &lt;= threshold
end</code></pre><p>The metric is computed using the <code>Distances.jl</code> library. Here, you can see that the function receives six arguments: the datasets <code>x</code> and <code>y</code>, the threshold, the iterator <code>idx</code> (which is computed by the shape and sampling functions), a metric from <code>Distances.jl</code>, and an ignored parameter that we will discuss later.