docs: def stderr_with_input(cmd, stdin):
      """Runs a command, passing something in stdin, and returning
      whatever came out from stdout"""
      handle, gpg_stderr = stderr_handle()
      LOGGER.debug("GPG command %s", ' '.join(cmd))
      try:
          gpg_proc = subprocess.Popen(cmd,  # nosec
                                      stdout=subprocess.PIPE,
                                      stdin=subprocess.PIPE,
                                      stderr=gpg_stderr)
  
          output, _err = gpg_proc.communicate(polite_bytes(stdin))
  
          if handle:
              handle.close()
  
          return output
      except subprocess.CalledProcessError as exception:
          return gpg_error(exception, 'GPG variable encryption error')
      except OSError as exception:
          raise CryptoritoError("File %s not found" % exception.filename)