def find_checkpoint(current_dir, checkpoint_name):
    if (not os.path.isdir(current_dir)):
        return None
    listfiles = os.listdir(current_dir)
    for item in listfiles:
        sub_dir = os.path.join(current_dir, item)
        if (item == checkpoint_name):
            return sub_dir
        elif os.path.isdir(sub_dir):
            search_result = find_checkpoint(sub_dir, checkpoint_name)
            if (search_result is not None):
                return search_result
    return None
def find_checkpoint(current_dir, checkpoint_name):
    if (not os.path.isdir(current_dir)):
        return None
    listfiles = os.listdir(current_dir)
    for item in listfiles:
        sub_dir = os.path.join(current_dir, item)
        if (item == checkpoint_name):
            return sub_dir
        elif os.path.isdir(sub_dir):
            search_result = find_checkpoint(sub_dir, checkpoint_name)
            if (search_result is not None):
                return search_result
    return None