code: def write_file(self, filename, *, overwrite=False):
          
          # Ensure file isn't already present
          if exists(filename) and not overwrite:
              raise OSError(filename + ' already present. Specify "overwrite=True" '
                            'to overwrite, or rename.'
                            )
  
          with open(filename, 'w') as yaml_file:
              yaml.dump(self._properties, yaml_file)
docs: Write new ChemKED YAML file based on object.
  
          Arguments:
              filename (`str`): Filename for target YAML file
              overwrite (`bool`, optional): Whether to overwrite file with given name if present.
                  Must be supplied as a keyword-argument.
  
          Raises:
              `NameError`: If ``filename`` is already present, and ``overwrite`` is not ``True``.
  
          Example:
              >>> dataset = ChemKED(yaml_file)
              >>> dataset.write_file(new_yaml_file)