code: def _fingerprint(jvm_options, classpath, java_version):
      
      digest = hashlib.sha1()
      # TODO(John Sirois): hash classpath contents?
      encoded_jvm_options = [option.encode('utf-8') for option in sorted(jvm_options)]
      encoded_classpath = [cp.encode('utf-8') for cp in sorted(classpath)]
      encoded_java_version = repr(java_version).encode('utf-8')
      for item in (encoded_jvm_options, encoded_classpath, encoded_java_version):
        digest.update(str(item).encode('utf-8'))
      return digest.hexdigest() if PY3 else digest.hexdigest().decode('utf-8')
docs: Compute a fingerprint for this invocation of a Java task.
  
         :param list jvm_options: JVM options passed to the java invocation
         :param list classpath: The -cp arguments passed to the java invocation
         :param Revision java_version: return value from Distribution.version()
         :return: a hexstring representing a fingerprint of the java invocation