class_docstr: Updater for kvstore.
docstr: sync state context.
docstr_tok: ["sync","state","context","."]
code: def sync_state_context(self, state, context):
      """sync state context."""
      if isinstance(state, NDArray):
          return state.as_in_context(context)
      elif isinstance(state, (tuple, list)):
          synced_state = (
              self.sync_state_context(i, context) for i in state
          )
          if isinstance(state, tuple):
              return tuple(synced_state)
          else:
              return list(synced_state)
      else:
          return state
  
file_path: mxnet/python/mxnet/optimizer/updater.py
imports: from __future__ import absolute_import
  import pickle
  import numpy
  from ..base import py_str
  from ..ndarray import NDArray
  from ..profiler import scope
  from ..util import is_np_array
  from .utils import _as_classic
label_desc: Use image node_id 3 for calling the Updater obj's underlying member method code with example usage: obj.sync_state_context(state, context) and returns: state, state, tuple, list