'Filter the tracklist by the given criterias.
A criteria consists of a model field to check and a list of values to
compare it against. If the model field matches one of the values, it
may be returned.
Only tracks that matches all the given criterias are returned.
Examples::
# Returns tracks with TLIDs 1, 2, 3, or 4 (tracklist ID)
filter({\'tlid\': [1, 2, 3, 4]})
# Returns track with URIs \'xyz\' or \'abc\'
filter({\'uri\': [\'xyz\', \'abc\']})
# Returns track with a matching TLIDs (1, 3 or 6) and a
# matching URI (\'xyz\' or \'abc\')
filter({\'tlid\': [1, 3, 6], \'uri\': [\'xyz\', \'abc\']})
:param criteria: on or more criteria to match by
:type criteria: dict, of (string, list) pairs
:rtype: list of :class:`mopidy.models.TlTrack`
.. deprecated:: 1.1
Providing the criteria via ``kwargs``.'

def filter(self, criteria=None, **kwargs):

    if kwargs:
        deprecation.warn(u'core.tracklist.filter:kwargs_criteria')
    criteria = (criteria or kwargs)
    tlids = criteria.pop(u'tlid', [])
    validation.check_query(criteria, validation.TRACKLIST_FIELDS)
    validation.check_instances(tlids, int)
    matches = self._tl_tracks
    for (key, values) in criteria.items():
        matches = [ct for ct in matches if (getattr(ct.track, key) in values)]
    if tlids:
        matches = [ct for ct in matches if (ct.tlid in tlids)]
    return matches
