docs: def _get_module_name(function):
      """
      Gets the function's module name
      Resolves the __main__ module to an actual module name
      Returns:
          str: the function's module name
      """
      module_name = function.__module__
      if module_name == '__main__':
          # get the main module object of the function
          main_module = inspect.getmodule(function)
          # get the module name from __file__ by getting the base name and removing the .py extension
          # e.g. test1.py => test1
          if hasattr(main_module, '__file__'):
              module_name = os.path.splitext(os.path.basename(main_module.__file__))[0]
      return module_name