def rpc_format(cluster, cluster_id):
    """
    Converts set of read pairs to RPC entry.

    Arguments
    ---------
    cluster : set of ReadPair
        ReadPairs to format.
    cluster_id : str
        Cluster identifier. Usually the index of the cluster in the list of
        clusters reported.

    Returns
    -------
    str
        Newline delimited representation of the cluster. Each line is a tab
        delimited representation of a ReadPair, prefixed by `cluster_id` and
        the size of the cluster.
    """
    return '\n'.join([cluster_id + '\t' +
                      str(len(cluster)) + '\t' +
                      pair.as_rpc() for pair in cluster])