def METHOD_NAME(self, time, data):
    """
    Extracts 'MemTotal', 'MemFree', 'Buffers', 'Cached', 'SwapTotal', 'SwapFree'
    and writes their values into a single line, in that order.
    """
    values = {}
    for line in data.split(b'\n'):
        m = self.meminfo_regex.match(line)
        if m:
            values[m.group(1)] = m.group(2)
    if len(values) == 6:
        return (time,
                b' '.join([values[x] for x in
                           (b'MemTotal', b'MemFree', b'Buffers', b'Cached', b'SwapTotal', b'SwapFree')]) + b'\n')