code: def get_module(name, required=None):
      
      if name not in _not_importable:
          try:
              return import_module(name)
          except ImportError:
              _not_importable.add(name)
              if required:
                  raise ValueError(required)
          except Exception as e:
              _not_importable.add(name)
              msg = "Error importing optional module {}".format(name)
              logger.exception(msg)
docs: Return module or None. Absolute import is required.
      :param (str) name: Dot-separated module path. E.g., 'scipy.stats'.
      :param (str) required: A string to raise a ValueError if missing
      :return: (module|None) If import succeeds, the module will be returned.