'Writes given `datafile` using `**options`.
:param datafile: The parsed test data object to be written
:type datafile: :py:class:`~robot.parsing.model.TestCaseFile`,
:py:class:`~robot.parsing.model.ResourceFile`,
:py:class:`~robot.parsing.model.TestDataDirectory`'

def write(self, datafile):

    with WritingContext(datafile, **self._options) as ctx:
        FileWriter(ctx).write(datafile)
