code: def dump(self, tempy_tree_list, filename, pretty=False):
          
          if not filename:
              raise ValueError('"filename" argument should not be none.')
          if len(filename.split(".")) > 1 and not filename.endswith(".py"):
              raise ValueError(
                  '"filename" argument should have a .py extension, if given.'
              )
          if not filename.endswith(".py"):
              filename += ".py"
          with open(filename, "w") as f:
              f.write(
                  "# -*- coding: utf-8 -*-\nfrom tempy import T\nfrom tempy.tags import *\n"
              )
              for tempy_tree in tempy_tree_list:
                  f.write(tempy_tree.to_code(pretty=pretty))
          return filename
docs: Dumps a Tempy object to a python file