from typing import Sequence
from typing import Hashable


def filter_dict(src: dict, keys_to_filter: Sequence[Hashable]) -> dict:
	"""
	Filters dictionary by keys_to_filter set.

	Parameters
	----------
	src: dict
		Source dictionary.
	keys_to_filter: Sequence[Hashable]
		Set of keys that should be in the final dictionary.

	Returns
	-------
	dict
		Filtered source dictionary.
	"""

	return {key: value for key, value in src.items() if key in keys_to_filter}