code: def get_contexts_data(opt, shared=None):
      if shared and "contexts_data" in shared:
          return shared["contexts_data"]
      return _load_personas(opt=opt)
  
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  import json
  import random
  from parlai.tasks.blended_skill_talk.agents import raw_data_path, safe_personas_path
  from parlai.tasks.interactive.worlds import InteractiveWorld
  from parlai.tasks.self_chat.worlds import SelfChatWorld
  from parlai.utils.io import PathManager
label_desc: Use image node_id 1 for calling a global function with example usage: get_contexts_data(opt, shared) and returns: _load_personas, shared