def state_to_tensor(self):
        """Converts a state into a single output (tensor)."""
        def fn(state):
            h, m, time_step = state
            return h
        return fn
Converts a state into a single output (tensor).
analyze/convnexts4nd/src/models/sequence/rnns/cells/memory.py