input: Write a function to determine the current version of HiveServer2.
  assert get_current_hiveserver_version() == '3.1.2'
  assert get_current_hiveserver_version() == '2.3.7'
  assert get_current_hiveserver_version() == '1.2.1'
output: def get_current_hiveserver_version():
      import subprocess
  
      try:
          result = subprocess.run(['hive', '--version'], capture_output=True, text=True)
          version_line = result.stdout.split('\n')[0]
          version = version_line.split()[-1]
          return version
      except Exception as e:
          return str(e)