def _pickle_node_state(node_state_wrapper):
    node_state = cython.declare(NodeState)
    node_state = node_state_wrapper.node_state
    attribs = {}
    extra_attribs = {}

    # get the standard attributes that can be pickled as they are
    attribs["has_value"] = node_state.has_value
    attribs["date"] = node_state.date
    attribs["value"] = node_state.value
    attribs["called"] = node_state.called
    attribs["callers"] = node_state.callers
    attribs["callees"] = node_state.callees
    attribs["override"] = node_state.override

    # store context and override references as ids instead of objects
    if node_state.alt_context:
        extra_attribs["alt_context_id"] = node_state.alt_context.get_id()

    if node_state.prev_alt_context:
        extra_attribs["prev_alt_context_id"] = node_state.prev_alt_context.get_id()

    return (node_state.ctx_id, node_state.dirty_flags, attribs, extra_attribs)
Get the default JT (not necessarily HA).
dataset/ETHPy150Open manahl/mdf/mdf/ctx_pickle.py/_pickle_node_state--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/libs/hadoop/src/hadoop/cluster.py/get_default_mrcluster