def _pairs(items):
    """Return a list with all the pairs formed by two different elements of a list "items"
    
       Note : This function is a useful tool for the building of the MNN graph.
    
    Parameters
    ----------
    items : list

    Returns
    -------
    list
        list of pairs formed by two different elements of the items

    """
    return [(items[i],items[j]) for i in range(len(items)) for j in range(i+1, len(items))]