def has_metal_sites(structure):
    """Returns True if there is a metal in the structure."""
    metal_sites = []
    for _, site in enumerate(structure):
        if site.species.elements[0].is_metal:
            metal_sites.append(site)

    return len(metal_sites) > 0