human
Write me a the Python program you requested given the following:
I am working on the file "RNN101/Customized RNN.ipynb".
The first task is:
Define MyRnnCell
The following property/methods should be correctly defined for an RNN cell.
* _call_ (method)
* output_size (property)
* state_size (property)
Can you write Python program for it?
assistant
#Here is the Python program you requested.

class MyRnnCell(tf.nn.rnn_cell.RNNCell):
    def __init__(self, state_size, dtype):
        self._state_size = state_size
        self._dtype = dtype
        self._W_xh = tf.get_variable(shape=[self._state_size, self._state_size],
                                     dtype=self._dtype, name="W_xh", initializer=tf.truncated_normal_initializer())
        self._W_hh = tf.get_variable(shape=[self._state_size, self._state_size],
                                     dtype=self._dtype, name="W_hh", initializer=tf.truncated_normal_initializer())
        self._W_ho = tf.get_variable(shape=[self._state_size, self._state_size],
                                     dtype=self._dtype, name="W_ho", initializer=tf.truncated_normal_initializer())
        self._b_o = tf.get_variable(shape=[self._state_size], dtype=self._dtype,
                                    name="b_o", initializer=tf.truncated_normal_initializer())
        
    def __call__(self, _input, state, scope=None):
        new_state = tf.tanh(tf.matmul(_input, self._W_xh)+tf.matmul(state, self._W_hh))
        new_output = tf.tanh(tf.matmul(new_state, self._W_ho)+self._b_o)
        return new_output, new_state
    
    @property
    def output_size(self):
        return self._state_size
    
    @property
    def state_size(self):
        return self._state_size