def METHOD_NAME(self, lstm_hidden_size):
    self._action_spec = BoundedTensorSpec((), torch.int64, 0, 2)
    self._num_actions = self._action_spec.maximum - self._action_spec.minimum + 1
    if lstm_hidden_size is not None:
        network_ctor = functools.partial(
            QRNNNetwork, lstm_hidden_size=lstm_hidden_size)
        if isinstance(lstm_hidden_size, int):
            lstm_hidden_size = [lstm_hidden_size]
        state = [()]
        for size in lstm_hidden_size:
            state.append((torch.randn((
                1,
                size,
            ), dtype=torch.float32), ) * 2)
    else:
        network_ctor = QNetwork
        state = ()
    return network_ctor, state