code: def get_topic_for_path(channel, chan_path_tuple):
      
      assert chan_path_tuple[0] == channel['dirname'], 'Wrong channeldir'
      chan_path_list = list(chan_path_tuple)
      chan_path_list.pop(0)    # skip the channel name
  
      if len(chan_path_list) == 0:
          return channel
  
      current = channel
      for subtopic in chan_path_list:
          current = list(filter(lambda d: 'dirname' in d and d['dirname'] == subtopic, current['children']))[0]
      return current
docs: Given channel (dict) that contains a hierary of TopicNode dicts, we use the
      walk the path given in `chan_path_tuple` to find the corresponding TopicNode.