def make_dist_table(d1, d2):
    """
    Makes a nicely formated table showing the control and target servers'
    answer distribution side by side.

    Inputs:
        - d1    : dict, control server distribution
        - d2    : dict, target server distribution

    Returns:
        - side_by_side  : str, nicely formatted table showing the distributions
                          side by side
    """
    a1 = set(d1)
    a2 = set(d2)
    answers = a1 | a2
    side_by_side = (
        "Answer".center(50, "_")
        + "|"
        + "Control".center(10, "_")
        + "|"
        + "Target".center(10, "_")
        + "|\n"
    )
    for ans in answers:
        if len(str(ans)) > 45:
            ans_str = str(ans[:45])
        else:
            ans_str = str(ans)
        side_by_side = (
            side_by_side
            + ans_str.center(50, ".")
            + "|"
            + str(d1.get(ans, 0)).center(10, ".")
            + "|"
            + str(d2.get(ans, 0)).center(10, ".")
            + "|\n"
        )
    return side_by_side