def _retrieve_metadata(gb_entry):
    """Parse GenBank entry to obtain relevant metadata information
    Parameters: 
    gb_entry - SeqRecord object
    Returns: 
    metadata - tuple of metadata
    """ 
    def get_source_index(features): 
        """Get the index of the 'source' entry for GenBank entry
        Parameters: 
        features - feature table of a GenBank entry
        Returns: 
        index - int - position of 'source' entry in feature table
        """
        index = None
        for feature in features: 
            if feature.type == "source":
                index = features.index(feature)
        return index
    def get_source_qualifiers(source_qual): 
        """Get qualifiers of interest for source
        Parameters: 
        source_qual - qualifiers in source
        Returns: 
        qual - list - contains qualifiers of interest
        """
        quals = []
        interest = ('isolate', 'host', 'country')
        for qual in interest: 
            if qual in source_qual:
                if len(source_qual[qual]) == 1: 
                    quals.append(source_qual[qual][0])
                else: 
                    quals.append(','.join(source_qual[qual]))
            else: 
                quals.append(None)
        return quals
    #Get qualifiers from 'source' feature
    source_index = get_source_index(gb_entry.features)
    source_qualifiers = get_source_qualifiers(gb_entry.features[source_index].qualifiers)
    #Order: accession id, sequence length, description, organism, isolate, host, country
    metadata = (
        gb_entry.id, 
        len(gb_entry.seq), 
        gb_entry.description, 
        gb_entry.annotations['source'],
        source_qualifiers[0],
        source_qualifiers[1],
        source_qualifiers[2],
    )
    return metadata