def METHOD_NAME(self):
    course_key = SampleCourseFactory.create().id
    course_usage_key = self.store.make_course_usage_key(course_key)
    # hide chapter_x from TOC
    chapter_x_key = course_key.make_usage_key('chapter', 'chapter_x')
    chapter_x = self.store.get_item(chapter_x_key)
    chapter_x.hide_from_toc = True
    self.store.update_item(chapter_x, ModuleStoreEnum.UserID.test)
    block_structure = BlockStructureFactory.create_from_modulestore(course_usage_key, self.store)
    # collect phase
    BlockDepthTransformer.collect(block_structure)
    BlockNavigationTransformer.collect(block_structure)
    block_structure._collect_requested_xblock_fields()
    assert chapter_x_key in block_structure
    # transform phase
    BlockDepthTransformer().transform(usage_info=None, block_structure=block_structure)
    BlockNavigationTransformer(0).transform(usage_info=None, block_structure=block_structure)
    block_structure._prune_unreachable()
    assert chapter_x_key in block_structure
    course_descendants = block_structure.get_transformer_block_field(
        course_usage_key,
        BlockNavigationTransformer,
        BlockNavigationTransformer.BLOCK_NAVIGATION,
    )
    # chapter_y and its descendants should be included
    for block_key in [
            course_key.make_usage_key('chapter', 'chapter_y'),
            course_key.make_usage_key('sequential', 'sequential_y1'),
            course_key.make_usage_key('vertical', 'vertical_y1a'),
            course_key.make_usage_key('problem', 'problem_y1a_1'),
    ]:
        assert str(block_key) in course_descendants
    # chapter_x and its descendants should not be included
    for block_key in [
            chapter_x_key,
            course_key.make_usage_key('sequential', 'sequential_x1'),
            course_key.make_usage_key('vertical', 'vertical_x1a'),
            course_key.make_usage_key('problem', 'problem_x1a_1'),
    ]:
        assert str(block_key) not in course_descendants