'Populate the ManyToMany data on the instance.'

def hydrate_m2m(self, bundle):

    if (bundle.obj is None):
        raise HydrationError((u"You    must    call    'full_hydrate'    before    attempting    to    run    'hydrate_m2m'    on    %r." % self))
    for (field_name, field_object) in self.fields.items():
        if (not field_object.is_m2m):
            continue
        if field_object.attribute:
            bundle.data[field_name] = field_object.hydrate_m2m(bundle)
    for (field_name, field_object) in self.fields.items():
        if (not field_object.is_m2m):
            continue
        method = getattr(self, (u'hydrate_%s' % field_name), None)
        if method:
            method(bundle)
    return bundle
