def _get_instance(instance_list, identity):
    """
    Find and return the resource instance regardless of whether the name or UUID is passed.
    """
    for resource in instance_list.items:
        if identity in (resource.properties.name, resource.id):
            return resource
    return None