code: async def _process_latching(self, key, latching_entry):
          
          if latching_entry[Constants.LATCH_CALLBACK]:
              # auto clear entry and execute the callback
              if latching_entry[Constants.LATCH_CALLBACK_TYPE]:
                  await latching_entry[Constants.LATCH_CALLBACK] \
                      ([key, latching_entry[Constants.LATCHED_DATA], time.time()])
              # noinspection PyPep8
              else:
                  latching_entry[Constants.LATCH_CALLBACK] \
                      ([key, latching_entry[Constants.LATCHED_DATA], time.time()])
              self.latch_map[key] = [0, 0, 0, 0, 0, None]
          else:
              updated_latch_entry = latching_entry
              updated_latch_entry[Constants.LATCH_STATE] = \
                  Constants.LATCH_LATCHED
              updated_latch_entry[Constants.LATCHED_DATA] = \
                  latching_entry[Constants.LATCHED_DATA]
              # time stamp it
              updated_latch_entry[Constants.LATCHED_TIME_STAMP] = time.time()
              self.latch_map[key] = updated_latch_entry
docs: This is a private utility method.
          This method process latching events and either returns them via
          callback or stores them in the latch map
  
          :param key: Encoded pin
  
          :param latching_entry: a latch table entry
  
          :returns: Callback or store data in latch map