docs: def create(self, validated_data):
          """Create ``Relation`` object and add partitions of ``Entities``."""
          # `partitions` field is renamed to `relationpartition_set` based on source of nested serializer
          partitions = validated_data.pop('relationpartition_set')
  
          with transaction.atomic():
              instance = Relation.objects.create(**validated_data)
              self._create_partitions(instance, partitions)
  
          return instance