class_docstr: Hook for Apache Livy through the REST API asynchronously.
  
  :param livy_conn_id: reference to a pre-defined Livy Connection.
  :param extra_options: A dictionary of options passed to Livy.
  :param extra_headers: A dictionary of headers passed to the HTTP request to livy.
  
  .. seealso::
      For more details refer to the Apache Livy API reference:
      https://livy.apache.org/docs/latest/rest-api.html
class_docstr_tok: ["Hook","for","Apache","Livy","through","the","REST","API","asynchronously",".",":","param","livy_conn_id",":","reference","to","a","pre-defined","Livy","Connection",".",":","param","extra_options",":","A","dictionary","of","options","passed","to","Livy",".",":","param","extra_headers",":","A","dictionary","of","headers","passed","to","the","HTTP","request","to","livy",".","..","seealso",":",":","For","more","details","refer","to","the","Apache","Livy","API","reference",":","https",":","\/\/livy.apache.org\/docs\/latest\/rest-api.html"]
docstr: Validate size format.
  
  :param size: size value
  :return: true if valid format
docstr_tok: ["Validate","size","format",".",":","param","size",":","size","value",":","return",":","true","if","valid","format"]
code: def _validate_size_format(size: str) -> bool:
      """
      Validate size format.
  
      :param size: size value
      :return: true if valid format
      """
      if size and not (
          isinstance(size, str)
          and re.fullmatch(r"\d+[kmgt]b?", size, re.IGNORECASE)
      ):
          raise ValueError(
              f"Invalid java size format for string'{size}'"
          )
      return True
  
imports: from __future__ import annotations
  import asyncio
  import json
  import re
  from enum import Enum
  from typing import TYPE_CHECKING, Any, Sequence
  import aiohttp
  import requests
  from aiohttp import ClientResponseError
  from asgiref.sync import sync_to_async
  from airflow.exceptions import AirflowException
  from airflow.providers.http.hooks.http import HttpAsyncHook, HttpHook
  from airflow.utils.log.logging_mixin import LoggingMixin
label_desc: Use image node_id 7 for calling the LivyAsyncHook obj's underlying member method code with example usage: obj._validate_size_format(size) and returns: True