code: def generate_im(self, model):
          
          kappa = kappy.KappaStd()
          model_str = export.export(model, 'kappa')
          kappa.add_model_string(model_str)
          kappa.project_parse()
          imap = kappa.analyses_influence_map(accuracy='medium')
          graph = im_json_to_graph(imap)
          return graph
docs: Return a graph representing the influence map generated by Kappa
  
          Parameters
          ----------
          model : pysb.Model
              The PySB model whose influence map is to be generated
  
          Returns
          -------
          graph : networkx.MultiDiGraph
              A MultiDiGraph representing the influence map