code: def set_analog_latch(self, pin, threshold_type, threshold_value,
                           cb=None, cb_type=None):
          
  
          task = asyncio.ensure_future(self.core.set_analog_latch(pin, threshold_type, threshold_value, cb, cb_type))
          result = self.loop.run_until_complete(task)
          return result
docs: This method "arms" an analog pin for its data to be latched and
          saved in the latching table.
          If a callback method is provided, when latching criteria is achieved,
          the callback function is called with latching data notification.
  
          :param pin: Analog pin number (value following an 'A' designator,
                      i.e. A5 = 5
  
          :param threshold_type: Constants.LATCH_GT | Constants.LATCH_LT  |
                                 Constants.LATCH_GTE | Constants.LATCH_LTE
  
          :param threshold_value: numerical value - between 0 and 1023
  
          :param cb: callback method
  
          :param cb_type: Constants.CB_TYPE_DIRECT = direct call or
                          Constants.CB_TYPE_ASYNCIO = asyncio coroutine
  
          :returns: True if successful, False if parameter data is invalid