code: def _load_wf_module(module_relative_name):
      
      if not module_relative_name:
          return None
      if not isinstance(module_relative_name, basestring):
          return None
  
      rootmodname = __name__
      modulekey = '{0}.{1}'.format(rootmodname, module_relative_name)
      if modulekey in sys.modules:
          return sys.modules.get(modulekey, None)
  
      # Try to load the module recursively
      modname = None
      tokens = module_relative_name.split('.')
      for part in tokens:
          modname = '.'.join([modname, part]) if modname else part
          import importlib
          try:
              _module = importlib.import_module('.'+modname, package=rootmodname)
              if not _module:
                  return None
          except Exception:
              return None
      return sys.modules.get(modulekey, None)
docs: Loads a python module based on the module relative name passed in.
  
      At first, tries to get the module from sys.modules. If not found there, the
      function tries to load it by using importlib. Returns None if no module
      found or importlib is unable to load it because of errors.
      Eg:
          _load_wf_module('sample.events')
  
      will try to load the module 'bika.lims.workflow.sample.events'
  
      :param modrelname: relative name of the module to be loaded
      :type modrelname: string
      :return: the module
      :rtype: module