def _child_vhds(session, sr_ref, vdi_uuid):
 children = set()
 for (ref, rec) in _get_all_vdis_in_sr(session, sr_ref):
  rec_uuid = rec['uuid']
  if (rec_uuid == vdi_uuid):
   continue
  parent_uuid = _get_vhd_parent_uuid(session, ref)
  if (parent_uuid != vdi_uuid):
   continue
  children.add(rec_uuid)
 return children

def _child_vhds ( session , sr_ref , vdi_uuid ) : children = set ( ) for ( ref , rec ) in _get_all_vdis_in_sr ( session , sr_ref ) : rec_uuid = rec [ 'uuid' ] if ( rec_uuid == vdi_uuid ) : continue parent_uuid = _get_vhd_parent_uuid ( session , ref ) if ( parent_uuid != vdi_uuid ) : continue children . add ( rec_uuid ) return children
return the immediate children of a given vhd .