<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _compile_control_flow_expression(self,
                                         expr: Expression,
                                         scope: Dict[str, TensorFluent],
                                         batch_size: Optional[int] = None,
                                         noise: Optional[List[tf.Tensor]] = None) -> TensorFluent:
        '''Compile a control flow expression `expr` into a TensorFluent
        in the given `scope` with optional batch size.

        Args:
            expr (:obj:`rddl2tf.expr.Expression`): A RDDL control flow expression.
            scope (Dict[str, :obj:`rddl2tf.fluent.TensorFluent`]): A fluent scope.
            batch_size (Optional[size]): The batch size.

        Returns:
            :obj:`rddl2tf.fluent.TensorFluent`: The compiled expression as a TensorFluent.
        '''
        etype = expr.etype
        args = expr.args
        if etype[1] == 'if':
            condition = self._compile_expression(args[0], scope, batch_size, noise)
            true_case = self._compile_expression(args[1], scope, batch_size, noise)
            false_case = self._compile_expression(args[2], scope, batch_size, noise)
            fluent = TensorFluent.if_then_else(condition, true_case, false_case)
        else:
            raise ValueError('Invalid control flow expression:\n{}'.format(expr))
        return fluent