docs: def download(outformat, path, identifier, namespace='cid', domain='compound', operation=None, searchtype=None,
               overwrite=False, **kwargs):
      """Format can be  XML, ASNT/B, JSON, SDF, CSV, PNG, TXT."""
      response = get(identifier, namespace, domain, operation, outformat, searchtype, **kwargs)
      if not overwrite and os.path.isfile(path):
          raise IOError("%s already exists. Use 'overwrite=True' to overwrite it." % path)
      with open(path, 'wb') as f:
          f.write(response)