code: def relabel_polymers(self, labels=None):
          
          if labels:
              if len(self._molecules) == len(labels):
                  for polymer, label in zip(self._molecules, labels):
                      polymer.id = label
              else:
                  raise ValueError('Number of polymers ({}) and number of labels ({}) must be equal.'.format(
                      len(self._molecules), len(labels)))
          else:
              for i, polymer in enumerate(self._molecules):
                  polymer.id = chr(i + 65)
          return
docs: Relabels the component Polymers either in alphabetical order or using a list of labels.
  
          Parameters
          ----------
          labels : list, optional
              A list of new labels.
  
          Raises
          ------
          ValueError
              Raised if the number of labels does not match the number of component Polymer objects.