def METHOD_NAME(distance_matrix,
                                          ensemble_assignment,
                                          samples=100,
                                          ncores=1):
    """
    Calculates distance matrices corresponding to bootstrapped ensembles, by
    resampling with replacement.
    Parameters
    ----------
    distance_matrix : encore.utils.TriangularMatrix
        Conformational distance matrix
    ensemble_assignment : str
        Mapping from frames to which ensemble they are from (necessary because
        ensembles are bootstrapped independently)
    samples : int, optional
        How many bootstrap samples to create.
    ncores : int, optional
        Maximum number of cores to be used (default is 1)
    Returns
    -------
    confdistmatrix : list of encore.utils.TriangularMatrix
    """
    bs_args = \
            [([distance_matrix, ensemble_assignment]) for i in range(samples)]
    pc = ParallelCalculation(ncores, bootstrapped_matrix, bs_args)
    pc_results = pc.run()
    bootstrap_matrices = list(zip(*pc_results))[1]
    return bootstrap_matrices