code: def save_stl(self, path, mode=MODE_STL_AUTO, update_normals=True):
          
          if update_normals:
              self.update_normals()
  
          filename = os.path.split(path)[-1]
  
          if mode is MODE_STL_AUTO:
              if self.mode == MODE_STL_BINARY:
                  save_func = self.__save_stl_binary
  
              elif self.mode == MODE_STL_ASCII:
                  save_func = self.__save_stl_ascii
  
              else:
                  raise ValueError("Mode %r is invalid" % mode)
  
          elif mode is MODE_STL_BINARY:
              save_func = self.__save_stl_binary
  
          else:
              raise ValueError("Mode %r is invalid" % mode)
  
          with open(path, 'wb') as fh:
              save_func(fh, filename)
docs: Save data with stl format
          :param str path:
          :param int mode:
          :param bool update_normals: