class_docstr: EventObserver.
  
  Users should only call the module-level functions.  Methods in this class
  should only be invoked by functions in this module.
  
  Events are guaranteed to be observed in the order they were notify()-ed.
  
  Observer functions *may* be called in any order (even though the current
  implementation calls them in the registration order, this may change).
  
  Observer functions *may* be called concurrently (even though the current
  implementation calls them serially, this may change).
  
  Exceptions in the observer functions are logged, but ignored. Note that a
  slow or stuck observer function may cause events to stop getting observed
  (which is why we may switch to calling them concurrently / with a timeout
  in the future).
class_docstr_tok: ["EventObserver",".","Users","should","only","call","the","module-level","functions",".","Methods","in","this","class","should","only","be","invoked","by","functions","in","this","module",".","Events","are","guaranteed","to","be","observed","in","the","order","they","were","notify","(",")","-ed",".","Observer","functions","*","may","*","be","called","in","any","order","(","even","though","the","current","implementation","calls","them","in","the","registration","order",",","this","may","change",")",".","Observer","functions","*","may","*","be","called","concurrently","(","even","though","the","current","implementation","calls","them","serially",",","this","may","change",")",".","Exceptions","in","the","observer","functions","are","logged",",","but","ignored",".","Note","that","a","slow","or","stuck","observer","function","may","cause","events","to","stop","getting","observed","(","which","is","why","we","may","switch","to","calling","them","concurrently","\/","with","a","timeout","in","the","future",")","."]
code: def register_observer(self, observer_fn: ObserverFn) -> None:
      with self._observers_lock:
          self._observers.append(observer_fn)
  
imports: from concurrent import futures
  import contextlib
  import dataclasses
  import queue
  import threading
  from typing import Any, Callable, List, Optional, Union
  from absl import logging
  from tfx.orchestration.experimental.core import task
  from tfx.utils import status
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 6 for calling the _EventObserver obj's underlying member method code with example usage: obj.register_observer(observer_fn) without return types