def find_folder(gc, path, root_id):
  """Find folder starting from root folder with UUID root_id.

  Args:
    gc (GirderClient): initialized client
    path (str): relative path of target folder from root
    root_id (str): UUID of root folder
  Return:
    Folder: girder folder
  """
  tokens = path.split('/')
  # look for target folder
  target = None
  tokens1 = []
  folder_id = root_id
  for ilevel, tok in enumerate(tokens):
    folders = gc.listFolder(folder_id)
    for folder in folders:
      name = folder['name']
      folder_id = folder['_id']
      if name == tok:
        target = folder
        tokens1.append(name)
        break
  # check found target
  if len(tokens1) != len(tokens):
    path1 = '/'.join(tokens1)
    msg = 'found "%s" from "%s"' % (path1, path)
    raise RuntimeError(msg)
  return target