code: def init_contexts(self, shared=None):
      print("[ loading contexts.. ]")
      data_path = os.path.join(
          self.opt["datapath"],
          "light_dialogue",
          "light_environment.pkl",
      )
      file = open(data_path, "rb")
      self.db = pickle.load(file)
      # compact list of rooms
      rs = []
      for _k, r in self.db["rooms"].items():
          rs.append(r)
      self.db["rooms"] = rs
      # compact list of characters
      cs = []
      for _k, c in self.db["characters"].items():
          cs.append(c)
      self.db["all_characters"] = cs
  
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  from parlai.core.worlds import create_task
  from parlai.tasks.self_chat.worlds import SelfChatWorld
  from parlai.tasks.interactive.worlds import InteractiveWorld
  from parlai.agents.repeat_label.repeat_label import RepeatLabelAgent
  import random
  import pickle
  import os
label_desc: Use image node_id 1 for calling the SelfChatWorld obj's underlying member method code with example usage: obj.init_contexts(shared) without return types