<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def genome_for_reference_name( reference_name, allow_older_downloaded_release=True):
 """ Given a genome reference name, such as "GRCh38", returns the corresponding Ensembl Release object. If `allow_older_downloaded_release` is True, and some older releases have been downloaded, then return the most recent locally available release. Otherwise, return the newest release of Ensembl (even if its data hasn't already been downloaded). """

    reference_name = normalize_reference_name(reference_name)
    species = find_species_by_reference(reference_name)
    (min_ensembl_release, max_ensembl_release) = \
        species.reference_assemblies[reference_name]
    if allow_older_downloaded_release:
        # go through candidate releases in descending order
        for release in reversed(range(min_ensembl_release, max_ensembl_release + 1)):
            # check if release has been locally downloaded
            candidate = EnsemblRelease.cached(release=release, species=species)
            if candidate.required_local_files_exist():
                return candidate
        # see if any of the releases between [max, min] are already locally
        # available
    return EnsemblRelease.cached(release=max_ensembl_release, species=species)