'Used to raise a consistent exception for any operation that is not
supported when a representation has differentials attached.'

def _raise_if_has_differentials(self, op_name):

    if self.differentials:
        raise TypeError(u"Operation    '{0}'    is    not    supported    when    differentials    are    attached    to    a    {1}.".format(op_name, self.__class__.__name__))
