code: def set_context(pid_file, context_info):
      
      assert type(context_info) == dict
  
      port_file = get_context_file_name(pid_file)
      with open(port_file, "wt") as f:
          f.write(json.dumps(context_info))
docs: Set context of running notebook.
  
      :param context_info: dict of extra context parameters, see comm.py comments