code: def next_state(chain, current_state):
      """
      Given a markov-chain, randomly chooses the next state given the current state.
      """
      next_state_map = chain.get(current_state)
      return __choose_state(next_state_map)
  
label_desc: Use image node_id 2 for calling a global function with example usage: next_state(chain, current_state) and returns: __choose_state