code: def dump(cls, filename, objects, properties, bools, encoding):
          
          if encoding is None:
              encoding = cls.encoding
  
          source = cls.dumps(objects, properties, bools)
          if PY2:
              source = unicode(source)
  
          with io.open(filename, 'w', encoding=encoding) as fd:
              fd.write(source)
docs: Write serialized objects, properties, bools to file.