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

def cast(self, dtype: tf.DType) -> 'TensorFluent':
        '''Returns a TensorFluent for the cast operation with given `dtype`.

        Args:
            dtype: The output's data type.

        Returns:
            A TensorFluent wrapping the cast operation.
        '''
        if self.dtype == dtype:
            return self
        t = tf.cast(self.tensor, dtype)
        scope = self.scope.as_list()
        batch = self.batch
        return TensorFluent(t, scope, batch=batch)