def merge_dict(original, updates):
    """Merge 2 dicts into one
    :param original the original dict
    :param updates the updates dict to be merged
    :return the merged dict
    """
    if not updates:
        return original

    try:
        merged_options = original.copy()
        merged_options.update(updates)
    except (AttributeError, ValueError) as ex:
        raise TypeError('original and updates must be a dictionary: %s' % ex)

    return merged_options