(self, model, initial=None, model_context=None)
return output
Extends `transitions.core.Machine.add_model` by `model_context` keyword.
        Args:
            model (list or object): A model (list) to be managed by the machine.
            initial (str, Enum or State): The initial state of the passed model[s].
            model_context (list or object): If passed, assign the context (list) to the machines
                model specific context map.
Extends `transitions.core.Machine.add_model` by `model_context` keyword.
        Args:
            model (list or object): A model (list) to be managed by the machine.
            initial (str, Enum or State): The initial state of the passed model[s].
            model_context (list or object): If passed, assign the context (list) to the machines
                model specific context map.
Extends transitions . core . Machine . add_model by model_context keyword . Args : model ( list or object ) : A model ( list ) to be managed by the machine . initial ( str Enum or State ) : The initial state of the passed model [ s ] . model_context ( list or object ) : If passed assign the context ( list ) to the machines model specific context map .
def add_model(self, model, initial=None, model_context=None):
        """ Extends `transitions.core.Machine.add_model` by `model_context` keyword.
        Args:
            model (list or object): A model (list) to be managed by the machine.
            initial (str, Enum or State): The initial state of the passed model[s].
            model_context (list or object): If passed, assign the context (list) to the machines
                model specific context map.
        """
        models = listify(model)
        model_context = listify(model_context) if model_context is not None else []
        output = _super(LockedMachine, self).add_model(models, initial)

        for mod in models:
            mod = self if mod is self.self_literal else mod
            self.model_context_map[id(mod)].extend(self.machine_context)
            self.model_context_map[id(mod)].extend(model_context)

        return output
def add_model ( self , model , initial = None , model_context = None ) : models = listify ( model ) model_context = listify ( model_context ) if model_context is not None else [ ] output = _super ( LockedMachine , self ) . add_model ( models , initial ) for mod in models : mod = self if mod is self . self_literal else mod self . model_context_map [ id ( mod ) ] . extend ( self . machine_context ) self . model_context_map [ id ( mod ) ] . extend ( model_context ) return output