code: def _load_tcmps_lib():
      
      global _g_TCMPS_LIB
      if _g_TCMPS_LIB is None:
          # This library requires macOS 10.14 or above
          if _mac_ver() < (10, 14):
              return None
  
          # The symbols defined in libtcmps are now exposed directly by
          # libunity_shared. Eventually the object_detector and
          # activity_classifier toolkits will use the same Python/C++ bridge as
          # the other toolkits, and this usage of ctypes will go away.
          file_dir = _os.path.dirname(__file__)
          lib_path = _os.path.abspath(_os.path.join(file_dir, _os.pardir, 'libunity_shared.dylib'))
          try:
              _g_TCMPS_LIB = _ctypes.CDLL(lib_path, _ctypes.RTLD_LOCAL)
          except OSError:
              pass
      return _g_TCMPS_LIB
docs: Load global singleton of tcmps lib handler.
  
      This function is used not used at the top level, so
      that the shared library is loaded lazily only when needed.