Return the individual info in a madeline formated string

def to_madeline(self):
        """
        Return the individual info in a madeline formated string
        """
        #Convert sex to madeleine type
        self.logger.debug("Returning madeline info")
        if self.sex == 1:
            madeline_gender = 'M'
        elif self.sex == 2:
            madeline_gender = 'F'
        else:
            madeline_gender = '.'
        #Convert father to madeleine type
        if self.father == '0':
            madeline_father = '.'
        else:
            madeline_father = self.father
        #Convert mother to madeleine type
        if self.mother == '0':
            madeline_mother = '.'
        else:
            madeline_mother = self.mother
        #Convert phenotype to madeleine type
        if self.phenotype == 1:
            madeline_phenotype = 'U'
        elif self.phenotype == 2:
            madeline_phenotype = 'A'
        else:
            madeline_phenotype = '.'
        
        return "{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}".format(
            self.family, self.individual_id, madeline_gender, 
            madeline_father, madeline_mother, madeline_phenotype,
            self.proband, self.consultand, self.alive
        )