import six


def instance_uuids_overlap(host_state, uuids):
    """Tests for overlap between a host_state and a list of uuids.

    Returns True if any of the supplied uuids match any of the instance.uuid
    values in the host_state.
    """
    if isinstance(uuids, six.string_types):
        uuids = [uuids]
    set_uuids = set(uuids)
    # host_state.instances is a dict whose keys are the instance uuids
    host_uuids = set(host_state.instances.keys())
    return bool(host_uuids.intersection(set_uuids))