code: def _gst_available():
      
      try:
          import gi
      except ImportError:
          return False
  
      try:
          gi.require_version('Gst', '1.0')
      except (ValueError, AttributeError):
          return False
  
      try:
          from gi.repository import Gst  # noqa
      except ImportError:
          return False
  
      return True
docs: Determine whether Gstreamer and the Python GObject bindings are
      installed.