Relabels the either in numerically 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 Monoer objects.

def relabel_monomers(self, labels=None):
        """Relabels the either in numerically 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 Monoer objects.
        """
        if labels:
            if len(self._monomers) == len(labels):
                for monomer, label in zip(self._monomers, labels):
                    monomer.id = str(label)
            else:
                error_string = (
                    'Number of Monomers ({}) and number of labels '
                    '({}) must be equal.')
                raise ValueError(error_string.format(
                    len(self._monomers), len(labels)))
        else:
            for i, monomer in enumerate(self._monomers):
                monomer.id = str(i + 1)
        return