Where does the self.get_serializer method come from in the Django REST Framework?
<p>In the <a href="https://github.com/tomchristie/django-rest-framework/blob/master/rest_framework/mixins.py" rel="noreferrer">DRF source code</a>, there's a get_serializer method. It wasn't inherited from object and it's not a method in the CreateModelMixin class. Where does this method come from?</p>

<pre><code>serializer = self.get_serializer(data=request.data)
</code></pre>

<p>Here's the larger chunk of code for context.</p>

<pre><code>from __future__ import unicode_literals

from rest_framework import status
from rest_framework.response import Response
from rest_framework.settings import api_settings


class CreateModelMixin(object):
    """
    Create a model instance.
    """
    def create(self, request, *args, **kwargs):
        serializer = self.get_serializer(data=request.data)
        serializer.is_valid(raise_exception=True)
        self.perform_create(serializer)
        headers = self.get_success_headers(serializer.data)
        return Response(serializer.data, status=status.HTTP_201_CREATED, headers=headers)

    def perform_create(self, serializer):
        serializer.save()

    def get_success_headers(self, data):
        try:
            return {'Location': data[api_settings.URL_FIELD_NAME]}
        except (TypeError, KeyError):
            return {}
</code></pre>

<p>There are a few SO posts that that also use this method. Like <a href="https://stackoverflow.com/questions/13376894/django-rest-framework-nested-self-referential-objects/19322399#19322399">this</a>, <a href="https://stackoverflow.com/questions/37729298/serializing-inside-method-field-in-django-rest-framework/37733776#37733776">this</a>, and <a href="https://stackoverflow.com/questions/31173324/django-rest-framework-update-field/31175629#31175629">this</a>. But I still can't figure out where the implementation is.</p>