code: def test_filter_by_keys(
      self, d: dict[utils.K, utils.V], expected: dict[utils.K, utils.V]
  ):
      predicate = lambda k: k in ("a", "b")
      filtered = utils.filter_by_keys(d, predicate)
      self.assertEqual(expected, filtered)
  
imports: from collections.abc import Callable, Sequence
  import copy
  from typing import Any, Optional, TypeVar, Union
  from absl.testing import absltest
  from absl.testing import parameterized
  from lit_nlp.api import types
  from lit_nlp.lib import utils
  import numpy
label_desc: Use image node_id 5 for calling the UtilsTest obj's underlying member method code with example usage: obj.test_filter_by_keys(d, expected) without return types