def join_dicts(*pargs, **kargs):
    """
    Convenience function to construct one dict from many. The result has all
    the keys from the inputs, with values taken from those inputs. If a key
    appears in two or more inputs, its value is taken from the leftmost input.
    """
    new_dict = kargs
    for item in reversed(pargs):
        new_dict.update(item)
    return new_dict