docstr: Helper for setting incremental state for an nn.Module.
docstr_tok: ["Helper","for","setting","incremental","state","for","an","nn.Module","."]
code: def set_incremental_state(
      self, incremental_state: Dict[str, Tensor], key: str, value
  ):
      """Helper for setting incremental state for an nn.Module."""
      if incremental_state is not None:
          full_key = prepare_full_key(self.instance_id, key)
          incremental_state[full_key] = value
  
imports: from typing import Dict, Optional, Tuple
  from pytext.config.module_config import ModuleConfig
  from pytext.models.module import Module
  from pytext.utils.usage import log_class_usage
  from torch import nn, Tensor
  from .utils import prepare_full_key
label_desc: Use image node_id 2 for calling the PyTextIncrementalDecoderComponent obj's underlying member method code with example usage: obj.set_incremental_state(incremental_state, key, value) without return types