<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def evaluate_familytree(self, family_tree, image_set):
 """ Evaluate strategy for the given family tree and return a dict of images to analyze that match the strategy :param family_tree: the family tree to traverse and evaluate :param image_set: list of all images in the context :return: """


        if family_tree is None or image_set is None:
            raise ValueError('Cannot execute analysis strategy on None image or image with no familytree data')

        toanalyze = OrderedDict()
        tree_len = len(family_tree)
        for i in family_tree:
            image = image_set[i]
            if self._should_analyze_image(image, family_tree.index(i), tree_len):
                toanalyze[image.meta['imageId']] = image

        return toanalyze