def get_all_child_m2m_relations(model):
return [<EOL>field for field in model._meta.get_fields()<EOL>if isinstance(field, ParentalManyToManyField)<EOL>]<EOL>
Return a list of ParentalManyToManyFields on the given model,
including ones attached to ancestors of the model