title: Get default value for serializer field from a method
body: <p>I struggle to find a way to do something I thought must be very basic. I have a serializer accepting either address (nested serializer) or coordinates (also a nested serializer). If the user supplies the address, I resolve it using some magic into coordinates and I want to provide those coordinates in the response. This is what I have so far:</p>
  <pre class="lang-py prettyprint-override"><code>class AddressSerializer(serializers.Serializer):
      zip_code = serializers.CharField()
      city = serializers.CharField(required=False)
      street = serializers.CharField(required=False)
      house_number = serializers.CharField(required=False)
  
  class GeoPointSerializer(serializers.Serializer):
      latitude = serializers.FloatField()
      longitude = serializers.FloatField()
  
  
  class TheSerializer(serializers.Serializer):
      address = AddressSerializer(required=False)
      coordinates = GeoPointSerializer(required=False)
  
      def validate(self, attrs):
          # check if the user provided either address or coordinates
  
      def resolve_address_to_coordinates(...):
          ...
  </code></pre>
  <p>and now I have no idea how to continue. I know about <code>SerializerMethodField</code> which would work fine, except it is read-only. Then I was playing with <code>default</code> and <code>source</code> attributes on the <code>coordinates</code> field, but also no success. Can anyone unstuck me?</p>