def merge_options(custom_options, **default_options):
    """
    Utility function to merge some default options with a dictionary of custom_options.
    Example: custom_options = dict(a=5, b=3)
             merge_options(custom_options, a=1, c=4)
             --> results in {a: 5, b: 3, c: 4}
    """
    merged_options = default_options
    merged_options.update(custom_options)
    return merged_options