code: def write(self, val: Any, from_stream: "Stream" = None):
      stream_item = self.to_stream_item(val)
  
      result, is_valid = self._filter(stream_item)
      if is_valid:
          return super(FilteredStream, self).write(result)
  
imports: from .stream import Stream
  from typing import Callable, Any
label_desc: Use image node_id 3 for calling the FilteredStream obj's underlying member method code with example usage: obj.write(val, from_stream) and returns: super