code: def _get_root_path(state_path):
      if state_path[-1] != "/":
          state_path += "/"
  
      return state_path
  
imports: import json
  import logging
  from tabpy.tabpy_server.management.util import write_state_config
  from threading import Lock
  from time import time
label_desc: Use image node_id 2 for calling a global function with example usage: _get_root_path(state_path) and returns: state_path