Ashby may represent candidate records as dictionaries containing fields such as stage, location, and source. Given a list of candidate records and a criteria dictionary, return only the records whose values match every key-value pair in the criteria.
Implement filter_candidates(candidates, criteria).
candidates is a list of dictionaries mapping strings to comparable values.criteria is a dictionary mapping field names to required values.criteria, the candidate contains that key and its value equals the required value.criteria is empty, every candidate matches.def filter_candidates(candidates, criteria):