class_docstr: An output target you can connect action signals to to implement
  behaviour.
class_docstr_tok: ["An","output","target","you","can","connect","action","signals","to","to","implement","behaviour","."]
docstr: Attach an end handler.
  
  This optional handler is called at the end of write. It should do any
  cleaning up necessary, and return 0 on success and -1 on error.
docstr_tok: ["Attach","an","end","handler",".","This","optional","handler","is","called","at","the","end","of","write",".","It","should","do","any","cleaning","up","necessary",",","and","return","0","on","success","and","-1","on","error","."]
code: def on_end(self, handler):
      """Attach an end handler.
  
      This optional handler is called at the end of write. It should do any
      cleaning up necessary, and return 0 on success and -1 on error.
  
      """
  
      if not at_least_libvips(8, 13):
          # fall back for older libvips
          self.on_finish(handler)
      else:
          self.signal_connect("end", handler)
  
file_path: pyvips/pyvips/vtargetcustom.py
imports: from __future__ import division
  import logging
  import pyvips
  from pyvips import ffi, vips_lib, at_least_libvips
label_desc: Use image node_id 5 for calling the TargetCustom obj's underlying member method code with example usage: obj.on_end(handler) without return types