class_docstr: Convenience class for obtaining GDAL major and minor version
  components and comparing between versions.  This is highly
  simplistic and assumes a very normal numbering scheme for versions
  and ignores everything except the major and minor components.
class_docstr_tok: ["Convenience","class","for","obtaining","GDAL","major","and","minor","version","components","and","comparing","between","versions",".","This","is","highly","simplistic","and","assumes","a","very","normal","numbering","scheme","for","versions","and","ignores","everything","except","the","major","and","minor","components","."]
docstr: Parses input tuple or string to GDALVersion. If input is a GDALVersion
  instance, it is returned.
  
  Parameters
  ----------
  input: tuple of (major, minor), string, or instance of GDALVersion
  
  Returns
  -------
  GDALVersion instance
docstr_tok: ["Parses","input","tuple","or","string","to","GDALVersion",".","If","input","is","a","GDALVersion","instance",",","it","is","returned",".","Parameters","--","--","--","--","--","input",":","tuple","of","(","major",",","minor",")",",","string",",","or","instance","of","GDALVersion","Returns","--","--","--","-","GDALVersion","instance"]
code: def parse(cls, input):
      """
      Parses input tuple or string to GDALVersion. If input is a GDALVersion
      instance, it is returned.
  
      Parameters
      ----------
      input: tuple of (major, minor), string, or instance of GDALVersion
  
      Returns
      -------
      GDALVersion instance
  
      """
      if isinstance(input, cls):
          return input
      if isinstance(input, tuple):
          return cls(*input)
      elif isinstance(input, str):
          # Extract major and minor version components.
          # alpha, beta, rc suffixes ignored
          match = re.search(r"^\d+\.\d+", input)
          if not match:
              raise ValueError(
                  "value does not appear to be a valid GDAL version "
                  f"number: {input}"
              )
          major, minor = (int(c) for c in match.group().split("."))
          return cls(major=major, minor=minor)
  
      raise TypeError(
          "GDALVersion can only be parsed from a string or tuple"
      )
  
imports: from functools import wraps, total_ordering
  from inspect import getfullargspec
  import logging
  import os
  import re
  import threading
  import warnings
  import attr
  from fiona._env import GDALDataFinder, GDALEnv, PROJDataFinder, calc_gdal_version_num, get_gdal_config, get_gdal_release_name, get_gdal_version_num, set_gdal_config, set_proj_data_search_path
  from fiona.errors import EnvError, FionaDeprecationWarning, GDALVersionError
  from fiona.session import Session, DummySession
label_desc: Use image node_id 5 for calling the GDALVersion obj's underlying member method code with example usage: obj.parse(cls, input) and returns: input, cls, cls