'Get simulation output bitmask
Helper method to get final simulation output bitmask from a set of
optional arguments including the bitmask itself and possibly boolean
flags.
Parameters
simulation_output : integer, optional
Simulation output bitmask. If this is specified, it is simply
returned and the other arguments are ignored.
simulate_state : boolean, optional
Whether or not to include the state in the simulation output.
simulate_disturbance : boolean, optional
Whether or not to include the state and observation disturbances
in the simulation output.
simulate_all : boolean, optional
Whether or not to include all simulation output.
\*\*kwargs
Additional keyword arguments. Present so that calls to this method
can use \*\*kwargs without clearing out additional arguments.'

def get_simulation_output(self, simulation_output=None, simulate_state=None, simulate_disturbance=None, simulate_all=None, **kwargs):

    if (simulation_output is None):
        simulation_output = 0
        if simulate_state:
            simulation_output |= SIMULATION_STATE
        if simulate_disturbance:
            simulation_output |= SIMULATION_DISTURBANCE
        if simulate_all:
            simulation_output |= SIMULATION_ALL
        if (simulation_output == 0):
            argument_set = (not all([(simulate_state is None), (simulate_disturbance is None), (simulate_all is None)]))
            if argument_set:
                raise ValueError('Invalid    simulation    output    options:    given    options    would    result    in    no    output.')
            simulation_output = self.smoother_output
    return simulation_output
