code: def release(self):
      if hasattr(self, "eod") and hasattr(self, "mainloopthread"):
          self.end_cond.acquire()
          while not hasattr(self, "end_reached"):
              self.end_cond.wait()
          self.end_cond.release()
      if hasattr(self, "error_msg"):
          raise IOError(self.error_msg)
  
file_path: TimeSide/timeside/core/encoder.py
imports: from timeside.core import Processor, implements, interfacedoc, abstract
  from timeside.core.api import IEncoder
  from .tools.gstutils import numpy_array_to_gst_buffer, MainloopThread
  import gi
  from gi.repository import GLib, Gst
  import threading
label_desc: Use image node_id 2 for calling the GstEncoder obj's underlying member method code with example usage: obj.release() without return types