def dict_isect(*args):
if not args:<EOL><INDENT>return {}<EOL><DEDENT>else:<EOL><INDENT>dictclass = OrderedDict if isinstance(args[<NUM_LIT:0>], OrderedDict) else dict<EOL>common_keys = set.intersection(*map(set, args))<EOL>first_dict = args[<NUM_LIT:0>]<EOL>return dictclass((k, first_dict[k]) for k in common_keys)<EOL><DEDENT>
Constructs a dictionary that contains keys common between all inputs.
The returned values will only belong to the first dictionary.

Args:
    *args : a sequence of dictionaries (or sets of keys)

Returns:
    Dict | OrderedDict :
        OrderedDict if the first argument is an OrderedDict, otherwise dict

Notes:
    This function can be used as an alternative to `dict_subset` where any
    key not in the dictionary is ignored. See the following example:

    >>> dict_isect({'a': 1, 'b': 2, 'c': 3}, ['a', 'c', 'd'])
    {'a': 1, 'c': 3}

Example:
    >>> dict_isect({'a': 1, 'b': 1}, {'b': 2, 'c': 2})
    {'b': 1}
    >>> dict_isect(odict([('a', 1), ('b', 2)]), odict([('c', 3)]))
    OrderedDict()
    >>> dict_isect()
    {}