code: def is_flax_available():
      _flax_available = (
          importlib.util.find_spec("jax") is not None
          and importlib.util.find_spec("flax") is not None
      )
      if _flax_available:
          try:
              importlib.metadata.version("jax")
              importlib.metadata.version("flax")
          except importlib.metadata.PackageNotFoundError:
              _flax_available = False
      return _flax_available
  
file_path: BentoML/grpc-client/bentoml/_internal/frameworks/utils/transformers.py
imports: from __future__ import annotations
  import importlib.metadata
  import importlib.util
  import logging
  import re
  import typing
  from contextlib import contextmanager
  from pathlib import Path
  import torch
  import torch.nn
  from packaging import version
label_desc: Use image node_id 1 for calling a global function with example usage: is_flax_available() and returns: _flax_available