'Re-represent the differentials to the specified classes.
This returns a new dictionary with the same keys but with the
attached differentials converted to the new differential classes.'

def _re_represent_differentials(self, new_rep, differential_class):

    if (differential_class is None):
        return dict()
    if ((not self.differentials) and differential_class):
        raise ValueError(u'No    differentials    associated    with    this    representation!')
    elif ((len(self.differentials) == 1) and inspect.isclass(differential_class) and issubclass(differential_class, BaseDifferential)):
        differential_class = {list(self.differentials.keys())[0]: differential_class}
    elif (set(differential_class.keys()) != set(self.differentials.keys())):
        ValueError(u'Desired    differential    classes    must    be    passed    in    as    a    dictionary    with    keys    equal    to    a    string    representation    of    the    unit    of    the    derivative    for    each    differential    stored    with    this    representation    object    ({0})'.format(self.differentials))
    new_diffs = dict()
    for k in self.differentials:
        diff = self.differentials[k]
        try:
            new_diffs[k] = diff.represent_as(differential_class[k], base=self)
        except Exception:
            if (differential_class[k] not in new_rep._compatible_differentials):
                raise TypeError(u'Desired    differential    class    {0}    is    not    compatible    with    the    desired    representation    class    {1}'.format(differential_class[k], new_rep.__class__))
            else:
                raise
    return new_diffs
