code: def _module_available(module_path: str) -> bool:
      """Check if a path is available in your environment.
  
      >>> _module_available('os')
      True
      >>> _module_available('bla.bla')
      False
      """
      try:
          return find_spec(module_path) is not None
      except AttributeError:
          # Python 3.6
          return False
      except ModuleNotFoundError:
          # Python 3.7+
          return False
  
file_path: fastNLP/fastNLP/envs/utils.py
imports: import os
  import math
  import time
  from importlib.util import find_spec
  from typing import Callable
  import importlib
  from pkg_resources import DistributionNotFound
  from packaging.version import Version
  import subprocess
  import pkg_resources
label_desc: Use image node_id 1 for calling a global function with example usage: _module_available(module_path) and returns: unknown, False, False