code: def get_module_version(module=None):
      """
      ## get_module_version
  
      Retrieves version of specified module
  
      Parameters:
          name (ModuleType): module of datatype `ModuleType`.
  
      **Returns:** version of specified module as string
      """
      # check if module type is valid
      assert not (module is None) and isinstance(
          module, types.ModuleType
      ), "[Vidgear:ERROR] :: Invalid module!"
  
      # get version from attribute
      version = getattr(module, "__version__", None)
      # retry if failed
      if version is None:
          # some modules uses a capitalized attribute name
          version = getattr(module, "__VERSION__", None)
      # raise if still failed
      if version is None:
          raise ImportError(
              "[Vidgear:ERROR] ::  Can't determine version for module: `{}`!".format(
                  module.__name__
              )
          )
      return str(version)
  
imports: import os
  import re
  import sys
  import cv2
  import types
  import errno
  import stat
  import shutil
  import importlib
  import requests
  import numpy
  import logging
  import platform
  import socket
  from tqdm import tqdm
  from contextlib import closing
  from pathlib import Path
  from colorlog import ColoredFormatter
  from pkg_resources import parse_version
  from requests.adapters import HTTPAdapter, Retry
  from ..version import __version__
label_desc: Use image node_id 3 for calling a global function with example usage: get_module_version(module) and returns: str