def load_febrl4(return_links=False):
    """Load the FEBRL 4 datasets.

    The Freely Extensible Biomedical Record Linkage (Febrl) package is
    distributed with a dataset generator and four datasets generated
    with the generator. This function returns the fourth Febrl dataset
    as a :class:`pandas.DataFrame`.

            *"Generated as one data set with 10000 records (5000
            originals and 5000  duplicates, with one duplicate per
            original), the originals have been split from the
            duplicates, into dataset4a.csv (containing the 5000
            original records) and dataset4b.csv (containing the
            5000 duplicate records) These two data sets can be
            used for testing linkage procedures."*

    Parameters
    ----------
    return_links: bool
        When True, the function returns also the true links.

    Returns
    -------
    (pandas.DataFrame, pandas.DataFrame)
        A :class:`pandas.DataFrame` with Febrl dataset4a.csv and a pandas
        dataframe with Febrl dataset4b.csv. When return_links is True,
        the function returns also the true links.

    """

    df_a = _febrl_load_data('dataset4a.csv')
    df_b = _febrl_load_data('dataset4b.csv')

    if return_links:
        links = pandas.MultiIndex.from_arrays([
            ["rec-{}-org".format(i) for i in range(0, 5000)],
            ["rec-{}-dup-0".format(i) for i in range(0, 5000)]]
        )
        return df_a, df_b, links
    else:
        return df_a, df_b
Load the FEBRL 4 datasets.

    The Freely Extensible Biomedical Record Linkage (Febrl) package is
    distributed with a dataset generator and four datasets generated
    with the generator. This function returns the fourth Febrl dataset
    as a :class:`pandas.DataFrame`.

            *"Generated as one data set with 10000 records (5000
            originals and 5000  duplicates, with one duplicate per
            original), the originals have been split from the
            duplicates, into dataset4a.csv (containing the 5000
            original records) and dataset4b.csv (containing the
            5000 duplicate records) These two data sets can be
            used for testing linkage procedures."*

    Parameters
    ----------
    return_links: bool
        When True, the function returns also the true links.

    Returns
    -------
    (pandas.DataFrame, pandas.DataFrame)
        A :class:`pandas.DataFrame` with Febrl dataset4a.csv and a pandas
        dataframe with Febrl dataset4b.csv. When return_links is True,
        the function returns also the true links.