def _merge_changes(changes: dict, m_dict: dict) -> dict:
    """Common class which can merge changes between two branches.

    This class does NOT CHECK FOR MERGE CONFLICTS, and will result in UNDEFINED
    BEHAVIOR if conflicts are present. All validations must be performed
    upstream of this method.

    Parameters
    ----------
    changes : dict
        mapping containing changes made on `master` and `dev` branch.
    m_dict : dict
        record structure of interest as it exists at the tip of the `master`
        branch. Acts as the starting point from which to merge changes on `dev`
        into.

    Returns
    -------
    dict
        record structure similar to `m_dict` input with changes merged into
        it which were made on the `dev` branch.
    """
    m_added = changes['master']['additions']
    m_unchanged = changes['master']['unchanged']
    # m_removed = changes['master']['removals']
    m_mutated = changes['master']['mutations']
    d_added = changes['dev']['additions']
    # d_unchanged = changes['dev']['unchanged']
    d_removed = changes['dev']['removals']
    d_mutated = changes['dev']['mutations']

    for dK in d_added:
        if dK not in m_added:
            m_dict[dK] = d_added[dK]

    for dK in d_removed:
        if dK in m_unchanged:
            del m_dict[dK]

    for dK in d_mutated:
        if dK not in m_mutated:
            m_dict[dK] = d_mutated[dK]

    return m_dict