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

def cpfs(self,
             state: Sequence[tf.Tensor],
             action: Sequence[tf.Tensor],
             noise: Optional[Noise] = None) -> Tuple[List[TensorFluent], List[TensorFluent]]:
        '''Compiles the intermediate and next state fluent CPFs given
        the current `state` and `action`.

        Args:
            state (Sequence[tf.Tensor]): A tuple of state tensors.
            action (Sequence[tf.Tensor]): A tuple of action tensors.

        Returns:
            Tuple[List[TensorFluent], List[TensorFluent]]: A pair of lists of TensorFluent
            representing the intermediate and state CPFs.
        '''
        scope = self.transition_scope(state, action)
        batch_size = int(state[0].shape[0])
        interm_fluents, next_state_fluents = self.compile_cpfs(scope, batch_size, noise)
        interms = [fluent for _, fluent in interm_fluents]
        next_state = [fluent for _, fluent in next_state_fluents]
        return interms, next_state