class_docstr: Logger which filters keys in logged data.
class_docstr_tok: ["Logger","which","filters","keys","in","logged","data","."]
code: def write(self, data: base.LoggingData):
      if self._keep:
          data = {k: data[k] for k in self._keep}
      if self._drop:
          data = {k: v for k, v in data.items() if k not in self._drop}
      self._to.write(data)
  
imports: import math
  import time
  from typing import Callable, Optional, Sequence
  from acme.utils.loggers import base
label_desc: Use image node_id 2 for calling the KeyFilter obj's underlying member method code with example usage: obj.write(data) without return types