human
Complete this python program:
def _find_all_vdis_and_system_vdis(xenapi, all_vdi_uuids, connected_vdi_uuids):
assistant
#Here is the Python code you requested.

    """Collects all VDIs and adds system VDIs to the connected set.
    """
    def _system_owned(vdi_rec):
        vdi_name = vdi_rec['name_label']
        return (vdi_name.startswith('USB') or vdi_name.endswith('.iso') or (vdi_rec['type'] == 'system'))
    for vdi_ref in call_xenapi(xenapi, 'VDI.get_all'):
        try:
            vdi_rec = call_xenapi(xenapi, 'VDI.get_record', vdi_ref)
        except XenAPI.Failure as e:
            if (e.details[0] != 'HANDLE_INVALID'):
                raise
            continue
        vdi_uuid = vdi_rec['uuid']
        all_vdi_uuids.add(vdi_uuid)
        if _system_owned(vdi_rec):
            print_xen_object('SYSTEM    VDI', vdi_rec, indent_level=0)
            connected_vdi_uuids.add(vdi_uuid)
        elif (not vdi_rec['managed']):
            print_xen_object('UNMANAGED    VDI', vdi_rec, indent_level=0)
            connected_vdi_uuids.add(vdi_uuid)