def dict_is_subset(subset: Any, full_set: Any) -> bool:
if not isinstance(subset, full_set.__class__):<EOL><INDENT>return False<EOL><DEDENT>elif isinstance(subset, dict):<EOL><INDENT>for k, v in subset.items():<EOL><INDENT>if k not in full_set or not dict_is_subset(v, full_set[k]):<EOL><INDENT>return False<EOL><DEDENT><DEDENT>return True<EOL><DEDENT>elif isinstance(subset, list):<EOL><INDENT>if len(subset) != len(full_set):<EOL><INDENT>return False<EOL><DEDENT>for a, b in zip(subset, full_set):<EOL><INDENT>if not dict_is_subset(a, b):<EOL><INDENT>return False<EOL><DEDENT><DEDENT>return True<EOL><DEDENT>else:<EOL><INDENT>return subset == full_set<EOL><DEDENT>
Checks that all keys present in `subset` are present and have the same
value in `full_set`. If a key is in `full_set` but not in `subset` then
True will be returned anyways.