code: def checkjava(path=None):
      """
      Checks if a Java executable is available for Tika.
      Args:
          path(str): path to java executable
      Returns:
          True if Java is available, False otherwise
      """
  
      # Get path to java executable if path not set
      if not path:
          path = os.getenv("TIKA_JAVA", "java")
  
      # Check if java binary is available on path
      try:
          _ = Popen(
              path,
              stdout=open(os.devnull, "w"),
              stderr=open(os.devnull, "w"),
          )
      except:
          return False
      return True
  
imports: from .imports import *
  from subprocess import Popen
label_desc: Use image node_id 31 for calling a global function with example usage: checkjava(path) and returns: True, False