code: def get_class_module(module_name: str, class_name: str) -> Optional[str]:
      
      matched_modules, erroneous_modules = find_class_module(module_name, class_name)
  
      for submodule, error in erroneous_modules:
          logging.warning('Could not inspect sub-module `%s` due to `%s` '
                          'when searching for `%s` in sub-modules of `%s`.',
                          submodule, type(error).__name__, class_name, module_name)
  
      if len(matched_modules) == 1:
          return matched_modules[0]
      if len(matched_modules) > 1:
          # check if all the module attributes point to the same class
          first_class = getattr(importlib.import_module(matched_modules[0]), class_name)
          for matched_module in matched_modules:
              another_class = getattr(importlib.import_module(matched_module), class_name)
              if another_class is not first_class:
                  raise ValueError('Found more than one sub-module when searching for `{}` in sub-modules of `{}`. '
                                   'Please specify the module explicitly. Found sub-modules: `{}`'
                                   .format(class_name, module_name, matched_modules))
          return matched_modules[0]
      return None
docs: Get a sub-module of the given module which has the given class.
  
      This method wraps `utils.reflection.find_class_module method` with the following behavior:
  
      - raise error when multiple sub-modules with different classes with the same name are found
      - return None when no sub-module is found
      - warn about non-searchable sub-modules
  
      .. note::
          This function logs!
  
      :param module_name: module to be searched
      :param class_name: searched class name
      :return: sub-module with the searched class or None