human
Write me a the Python program you requested given the following:
Complete the below
def _test_parse_factory(source):

    ''''Generate a test method for parse()ing the given source.
    The generated function extracts each phylogenetic tree using the parse()
    function.'
    '''
assistant
#Here is the Python program you requested.
    filename = os.path.join('CDAO/', source)
    def test_parse(self):
        trees = list(bp._io.parse(filename, 'cdao'))
    test_parse.__doc__ = ('Parse    the    phylogenies    in    %s.' % source)
    return test_parse