code: def collapse_phenotypes(self,input_phenotype_labels,output_phenotype_label,verbose=True):
          
          if isinstance(input_phenotype_labels,str): input_phenotype_labels = [input_phenotype_labels]
          bad_phenotypes = set(input_phenotype_labels)-set(self.phenotypes)
          if len(bad_phenotypes) > 0: raise ValueError("Error phenotype(s) "+str(bad_phenotypes)+" are not in the data.")
          data = self.copy()
          if len(input_phenotype_labels) == 0: return data
          def _swap_in(d,inputs,output):
              # Get the keys we need to merge together
              overlap = set(d.keys()).intersection(inputs)
              # if there are none to merge we're done already
              if len(overlap) == 0: return d
              keepers = [(k,v) for k,v in d.items() if k not in inputs]
              # combine anything thats not a keeper
              return dict(keepers+\
                          [(output_phenotype_label,max([d[x] for x in overlap]))])
          data['phenotype_calls'] = data.apply(lambda x:
              _swap_in(x['phenotype_calls'],input_phenotype_labels,output_phenotype_label)
              ,1)
          def _set_label(d):
              vals = [k for k,v in d.items() if v==1]
              return np.nan if len(vals) == 0 else vals[0]
          data['phenotype_label'] = data.apply(lambda x:
                  _set_label(x['phenotype_calls']),1)
          return data
docs: Rename one or more input phenotypes to a single output phenotype
  
          Args:
              input_phenotype_labels (list): A str name or list of names to combine
              output_phenotype_label (list): A str name to change the phenotype names to
              verbose (bool): output more details
  
          Returns:
              CellDataFrame: The CellDataFrame modified.