code: def createBatchfile(keyparams=allparams):
      
      useparams = {}
      for key, value in keyparams.items():
          if value:
              useparams.update({key: value})
      batchfile = gpg.gen_key_input(separate_keyring=True,
                                    save_batchfile=True,
                                    **useparams)
      log.info("Generated GnuPG batch file:\n%s" % batchfile)
      return batchfile
docs: Create the batchfile for our new key.
  
      :params dict keyparams: A dictionary of arguments for creating the key. It
                              should probably be ``allparams``.
      :rtype: str
      :returns: A string containing the entire GnuPG batchfile.