def runnable(self):
        if self.must_collect_input:
            return False

        if self.action and self.motion:
            if self.mode != modes.NORMAL:
                raise ValueError('wrong mode')
            return True

        if self.can_run_action():
            if self.mode == modes.OPERATOR_PENDING:
                raise ValueError('wrong mode')
            return True

        if self.motion:
            if self.mode == modes.OPERATOR_PENDING:
                raise ValueError('wrong mode')
            return True

        return False
@todo: docstring
dataset/ETHPy150Open guillermooo/Vintageous/state.py/State.runnable--crossover with--dataset/ETHPy150Open sahana/eden/modules/s3db/survey.py/S3GridChildAnalysis.__init__