def write_heading(self, heading, level=0, index_id=None, label=None):
        assert self.stream
        assert heading, "Heading should not be empty"
        assert level < len(self.heading_styles) <= 0
        if level >= len(self.heading_styles):
            level = len(self.heading_styles) - 1
        heading_size = len(heading)
        heading_style = self.heading_styles[level]
        if level == 0 and heading_size < 70:
            heading_size = 70
        separator = heading_style * heading_size
        if index_id:
            if isinstance(index_id, (list, tuple)):
                index_id = ", ".join(index_id)
            self.stream.write(".. index:: %s\n\n" % index_id)
        if label:
            self.stream.write(".. _%s:\n\n" % label)
        if level == 0:
            self.stream.write("%s\n" % separator)
        self.stream.write("%s\n" % heading)
        self.stream.write("%s\n" % separator)
        self.stream.write("\n")
dataset/ETHPy150Open behave/behave/behave/formatter/sphinx_util.py/DocumentWriter.write_heading/swapped operands of `<=`