def METHOD_NAME(self, field_name, model_class):
    """
    Create a field representing the object's own URL.
    """
    if field_name == 'url':
        # use dedicated serializer for url field to get "nested" url
        # for custom field value (in context of other object)
        field_class = self.custom_field_value_url_field
        field_kwargs = self._get_custom_field_value_url_kwargs(model_class)
    else:
        field_class, field_kwargs = super().METHOD_NAME(
            field_name, model_class
        )
    return field_class, field_kwargs