code: def get_create_base_agent(self, agent):
          
          try:
              base_agent = self.agents[agent.name]
          except KeyError:
              base_agent = BaseAgent(agent.name)
              self.agents[agent.name] = base_agent
  
          return base_agent
docs: Return BaseAgent from an Agent, creating it if needed.
  
          Parameters
          ----------
          agent : indra.statements.Agent
  
          Returns
          -------
          base_agent : indra.mechlinker.BaseAgent