class_docstr: Python wrapper class to manage TfLiteDelegate objects.
  
  The shared library is expected to have two functions,
  tflite_plugin_create_delegate and tflite_plugin_destroy_delegate,
  which should implement the API specified in
  tensorflow/lite/delegates/external/external_delegate_interface.h.
class_docstr_tok: ["Python","wrapper","class","to","manage","TfLiteDelegate","objects",".","The","shared","library","is","expected","to","have","two","functions",",","tflite_plugin_create_delegate","and","tflite_plugin_destroy_delegate",",","which","should","implement","the","API","specified","in","tensorflow\/lite\/delegates\/external\/external_delegate_interface.h","."]
code: def __del__(self):
      # __del__ can not be called multiple times, so if the delegate is destroyed.
      # don't try to destroy it twice.
      if self._library is not None:
          self._library.tflite_plugin_destroy_delegate.argtypes = [
              ctypes.c_void_p
          ]
          self._library.tflite_plugin_destroy_delegate(
              self._delegate_ptr
          )
          self._library = None
  
imports: import ctypes
  import enum
  import os
  import platform
  import sys
  import numpy
label_desc: Use image node_id 2 for calling the Delegate obj's underlying member method code with example usage: obj.__del__() without return types