Write model data to file or stdout in DOT (text) format.

def print_output(self, dotdata, output_file=None):
        """Write model data to file or stdout in DOT (text) format."""
        if six.PY3 and isinstance(dotdata, six.binary_type):
            dotdata = dotdata.decode()

        if output_file:
            with open(output_file, 'wt') as dot_output_f:
                dot_output_f.write(dotdata)
        else:
            self.stdout.write(dotdata)