'Handle a sample, converting if necessary.'

def handle_sample(self, s):

    LOG.debug('handling    sample    %s', s)
    if (self.source.get('unit', s.unit) == s.unit):
        s = self._convert(s)
        LOG.debug('converted    to:    %s', s)
    return s
