def post_init(self):
    """
    Now that all modules have been imported and executed their __init__
     do a postprocessing pass
     to process metadata that might be affected by configuration modules
    """
    # Do all of this work here rather than in __init__
    #  so it can include the effects of any pymodel config modules

    # Make copies of collections that may be altered later
    # self.actions is not used in this module outside this __init__
    #  BUT it is used in several places in Model and ProductModelProgram
    # EnabledTransitions below works directly on self.module.graph,
    #  not self.actions
    if not hasattr(self.module, 'actions'):
      self.actions = list(self.actions_in_graph()) # default, make copy
    else:
      self.actions = list(self.module.actions) # copy
    Model.post_init(self) # uses self.actions
    # Construct self.graph like self.module.graph 
    #  BUT also accounts for include, exclude via self.actions
    self.graph = [ (current, (action,args,result), next) 
                   for (current, (action,args,result), next) in
                   self.module.graph if action in self.actions ]
    # prepare for first run
    self.current = self.module.initial # raise exception if module is not FSM
dataset/ETHPy150Open jon-jacky/PyModel/pymodel/FSM.py/FSM.post_init/original