code: def try_import_fastai():
      try:
          import fastai
          from pkg_resources import (
              parse_version,
          )  # pylint: disable=import-outside-toplevel
  
          fastai_version = parse_version(fastai.__version__)
          assert (
              parse_version("2.0.0")
              <= fastai_version
              < parse_version("2.8")
          ), "Currently, we only support 2.0.0<=fastai<2.8"
  
          # fastai is doing library setup during star imports. These are required for correct library functioning.
          # Local star imports are not possible in-place, so separate helper packages is created
          import autogluon.tabular.models.fastainn.imports_helper
  
      except ModuleNotFoundError as e:
          raise ImportError(
              f"Import fastai failed. A quick tip is to install via `pip install autogluon.tabular[fastai]=={__version__}`. "
          )
  
file_path: autogluon/common/src/autogluon/common/utils/try_import.py
imports: import logging
  import platform
  import sys
  from types import ModuleType
  from ..version import __version__
label_desc: Use image node_id 7 for calling a global function with example usage: try_import_fastai() without return types