title: How to know the key of a DRF Serializer DictField from within that field's child?
body: <p>Let's say we have some Django Rest Framework <code>Serializer</code> (we'll call it &quot;<code>serializer</code>&quot;) that has a custom <code>DictField</code> as one of its fields. Within that custom <code>DictField</code>, the child field is tasked with recording the dictionary key that it is the value of whenever <code>serializer.save()</code> is called.</p>
  <p>How would one go about knowing the key of the dictionary being deserialized when interpreting the internal value to be saved?</p>
  <pre><code>class ChildField(Serializer):
      parent_key = CharField()
  
      def to_internal_value(self, data):
          # At this point, the likely candidate for the
          # key is self.field_value, but it is actually ''
          # data['parent_key'] = ???
  
          return super().to_internal_value(data)
  
  class ParentField(DictField):
      child = ChildField()
  </code></pre>
  <p>Assume the data being deserialized is the following:</p>
  <pre><code>{
      &quot;the_dictionary&quot;: {
          &quot;key_we_want_to_save&quot;: {
              &quot;arbitrary_other_child_data&quot;: True
           }
      }
  }
  </code></pre>