def conduct(self, randomize=True):
if self._control is None:<EOL><INDENT>raise exceptions.LaboratoryException(<EOL>'<STR_LIT>'<EOL>)<EOL><DEDENT>if not self.enabled():<EOL><INDENT>control = self._run_tested_func(raise_on_exception=True, **self._control)<EOL>return control.value<EOL><DEDENT>def get_func_executor(obs_def, is_control):<EOL><INDENT>"""<STR_LIT>"""<EOL>return lambda *a, **kw: (self._run_tested_func(raise_on_exception=is_control, **obs_def), is_control)<EOL><DEDENT>funcs = [<EOL>get_func_executor(self._control, is_control=True),<EOL>] + [get_func_executor(cand, is_control=False,) for cand in self._candidates]<EOL>if randomize:<EOL><INDENT>random.shuffle(funcs)<EOL><DEDENT>control = None<EOL>candidates = []<EOL>for func in funcs:<EOL><INDENT>observation, is_control = func()<EOL>if is_control:<EOL><INDENT>control = observation<EOL><DEDENT>else:<EOL><INDENT>candidates.append(observation)<EOL><DEDENT><DEDENT>result = Result(self, control, candidates)<EOL>try:<EOL><INDENT>self.publish(result)<EOL><DEDENT>except Exception:<EOL><INDENT>msg = '<STR_LIT>'<EOL>logger.exception(msg % self.name)<EOL><DEDENT>return control.value<EOL>
Run control & candidate functions and return the control's return value.
``control()`` must be called first.

:param bool randomize: controls whether we shuffle the order
    of execution between control and candidate
:raise LaboratoryException: when no control case has been set
:return: Control function's return value