code: def family_check(self):
          self.logger.info("Checking family relations for {0}".format(
              self.family_id)
          )
          for individual_id in self.individuals:
              self.logger.debug("Checking individual {0}".format(individual_id))
              individual = self.individuals[individual_id]
              self.logger.debug("Checking if individual {0} is affected".format(
                  individual_id))
              if individual.affected:
                  self.logger.debug("Found affected individual {0}".format(
                      individual_id)
                  )
                  self.affected_individuals.add(individual_id)
              father = individual.father
              mother = individual.mother
              if individual.has_parents:
                  self.logger.debug("Individual {0} has parents".format(
                      individual_id))
                  self.no_relations = False
                  try:
                      self.check_parent(father, father=True)
                      self.check_parent(mother, father=False)
                  except PedigreeError as e:
                      self.logger.error(e.message)
                      raise e
                  if individual.has_both_parents:
                      self.trios.append(set([individual_id, father, mother]))
                  elif father != '0':
                      self.duos.append(set([individual_id, father]))
                  else:
                      self.duos.append(set([individual_id, mother]))
              for individual_2_id in self.individuals:
                  if individual_id != individual_2_id:
                      if self.check_siblings(individual_id, individual_2_id):
                          individual.siblings.add(individual_2_id)