code: def load_world_module(
      taskname: str,
      interactive_task: bool = False,
      selfchat_task: bool = False,
      num_agents: int = None,  # a priori may not know the number of agents
      default_world=None,
  ):
      """
      Load the world module for the specific environment. If not enough information is to
      determine which world should be loaded, returns None.
  
      :param taskname:
          path to task class in one of the above formats
      :param interactive_task:
          whether or not the task is interactive
      :param num_agents:
          number of agents in the world; this may not be known a priori
      :param default_world:
          default world to return if specified
  
      :return:
          World module (or None, if not enough info to determine is present)
      """
      task = taskname.strip()
      repo = "parlai"
      if task.startswith("internal:"):
          # To switch to local repo, useful for non-public projects
          # (make a directory called 'parlai_internal' with your private agents)
          repo = "parlai_internal"
          task = task[9:]
      task_path_list = task.split(":")
  
      if len(task_path_list) > 1:
          task_path_list[1] = (
              task_path_list[1][0].upper() + task_path_list[1][1:]
          )
          world_name = task_path_list[1] + "World"
          if interactive_task:
              world_name = "Interactive" + world_name
          elif selfchat_task:
              world_name = "SelfChat" + world_name
      else:
          if interactive_task:
              world_name = "InteractiveWorld"
          elif selfchat_task:
              world_name = "SelfChatWorld"
          else:
              world_name = "DefaultWorld"
  
      if "." in task_path_list[0]:
          # The case of opt['task'] = 'parlai.tasks.squad.agents:DefaultTeacher'
          # (i.e. specifying your own path directly)
          module_name_parts = task_path_list[0].split(".")
          if module_name_parts[-1] == "agents":
              # The world will be located in ".worlds", so correct the path
              module_name = ".".join(module_name_parts[:-1]) + ".worlds"
          else:
              module_name = task_path_list[0]
      else:
          task = task_path_list[0].lower()
          module_name = f"{repo}.tasks.{task}.worlds"
  
      try:
          my_module = importlib.import_module(module_name)
          world_class = getattr(my_module, world_name)
      except (ModuleNotFoundError, AttributeError):
          # Defaults to this if you did not specify a world for your task.
          world_class = _get_default_world(default_world, num_agents)
  
      return world_class
  
file_path: ParlAI/parlai/core/loader.py
imports: from typing import Callable, Dict, Type, Tuple
  import importlib
  from collections import namedtuple
label_desc: Use image node_id 11 for calling a global function with example usage: load_world_module(taskname, interactive_task, chat_task, num_agents, default_world) and returns: world_class