Build individual text block of :class:`~mwtab.mwtab.MWTabFile` instance.

        :param lexer: instance of the mwtab tokenizer.
        :type lexer: :func:`~mwtab.tokenizer.tokenizer`
        :return: Section dictionary.
        :rtype: :py:class:`collections.OrderedDict`

def _build_block(self, lexer):
        """Build individual text block of :class:`~mwtab.mwtab.MWTabFile` instance.

        :param lexer: instance of the mwtab tokenizer.
        :type lexer: :func:`~mwtab.tokenizer.tokenizer`
        :return: Section dictionary.
        :rtype: :py:class:`collections.OrderedDict`
        """
        section = OrderedDict()
        token = next(lexer)

        while not token.key.startswith("#ENDSECTION"):

            if token.key.startswith("SUBJECT_SAMPLE_FACTORS"):
                header = token._fields[1:]
                values = token[1:]
                section.setdefault("SUBJECT_SAMPLE_FACTORS", [])
                section["SUBJECT_SAMPLE_FACTORS"].append(OrderedDict(zip(header, values)))

            elif token.key.endswith("_START"):
                section_key = token.key
                section.setdefault(section_key, OrderedDict())
                data = []

                token = next(lexer)
                header = list(token.value)

                while not token.key.endswith("_END"):
                    if token.key == "Samples":
                        header[0] = "metabolite_name"
                        section[section_key][token.key] = list(token.value[1:])
                    elif token.key == "Factors":
                        section[section_key][token.key] = list(token.value[1:])
                    elif token.key in ("metabolite_name", "Bin range(ppm)"):
                        section[section_key]["Fields"] = list(token.value)
                    else:
                        data.append(OrderedDict(zip(header, token.value)))

                    token = next(lexer)
                section[section_key]["DATA"] = data

            elif token.key.endswith("_RESULTS_FILE"):
                if len(token) == 4:
                    key, value, extrakey, extravalue = token
                    section[key] = OrderedDict([(key, value), (extrakey, extravalue)])
                else:
                    key, value = token
                    section[key] = value

            else:
                key, value, = token
                if key in section:
                    section[key] += "\n{}".format(value)
                else:
                    section[key] = value
            token = next(lexer)
        return section