def _match_item(item, any_all=any, ignore_case=False, normalize_values=False, **kwargs):
	"""Match items by metadata.

	Note:
		Metadata values are lowercased when ``normalized_values`` is ``True``,
		so ``ignore_case`` is automatically set to ``True``.

	Parameters:
		item (~collections.abc.Mapping, str, os.PathLike): Item dict or filepath.
		any_all (callable): A callable to determine if any or all filters must match to match item.
			Expected values :obj:`any` (default) or :obj:`all`.
		ignore_case (bool): Perform case-insensitive matching.
			Default: ``False``
		normalize_values (bool): Normalize metadata values to remove common differences between sources.
			Default: ``False``
		kwargs (list): Lists of values to match the given metadata field.

	Returns:
		bool: True if matched, False if not.
	"""

	it = get_item_tags(item)

	return any_all(
		_match_field(
			get_field(it, field), pattern, ignore_case=ignore_case, normalize_values=normalize_values
		) for field, patterns in kwargs.items() for pattern in patterns
	)
Match items by metadata.

	Note:
		Metadata values are lowercased when ``normalized_values`` is ``True``,
		so ``ignore_case`` is automatically set to ``True``.

	Parameters:
		item (~collections.abc.Mapping, str, os.PathLike): Item dict or filepath.
		any_all (callable): A callable to determine if any or all filters must match to match item.
			Expected values :obj:`any` (default) or :obj:`all`.
		ignore_case (bool): Perform case-insensitive matching.
			Default: ``False``
		normalize_values (bool): Normalize metadata values to remove common differences between sources.
			Default: ``False``
		kwargs (list): Lists of values to match the given metadata field.

	Returns:
		bool: True if matched, False if not.