class_docstr: Base class for all other agents.
class_docstr_tok: ["Base","class","for","all","other","agents","."]
docstr: Share any parameters needed to create a shared version of this agent.
  
  Default implementation shares the class and the opt, but most agents will want
  to also add model weights, teacher data, etc. This especially useful for
  avoiding providing pointers to large objects to all agents in a batch.
docstr_tok: ["Share","any","parameters","needed","to","create","a","shared","version","of","this","agent",".","Default","implementation","shares","the","class","and","the","opt",",","but","most","agents","will","want","to","also","add","model","weights",",","teacher","data",",","etc",".","This","especially","useful","for","avoiding","providing","pointers","to","large","objects","to","all","agents","in","a","batch","."]
code: def share(self):
      """
      Share any parameters needed to create a shared version of this agent.
  
      Default implementation shares the class and the opt, but most agents will want
      to also add model weights, teacher data, etc. This especially useful for
      avoiding providing pointers to large objects to all agents in a batch.
      """
      shared = {}
      shared["class"] = type(self)
      shared["opt"] = self.opt
      return shared
  
imports: import copy
  from typing import List, Union
  from parlai.core.build_data import modelzoo_path
  from parlai.core.loader import load_agent_module
  from parlai.core.loader import register_agent
  from parlai.core.message import Message
  from parlai.core.opt import Opt
  from parlai.utils.misc import warn_once
  import parlai.utils.logging
  from parlai.utils.io import PathManager
label_desc: Use image node_id 10 for calling the Agent obj's underlying member method code with example usage: obj.share() and returns: shared