def get_instance(instances, instance_name):
    """ Get instance from instances with the given instance name """
    for instance in instances.values():
        if instance_name == instance.name:
            return instance
    return None