code: def get_data_id(pathname):
      """
      Parses data ID from query path (ex: 'foo/bar/1' => '1')
      """
      data_id = pathname.split("/")[-1]
      data_id = data_id = (
          global_state.get_data_id_by_name(data_id) or data_id
      )
      if (global_state.size()) == 0:
          return None
      if global_state.contains(data_id):
          return data_id
      else:
          return sorted(global_state.keys())[0]
  
label_desc: Use image node_id 1 for calling a global function with example usage: get_data_id(pathname) and returns: None, data_id, sorted