def insert_data_key(self, data_key):
        """Insert a data key into the key vault.

        :Parameters:
          - `data_key`: The data key document to insert.

        :Returns:
          The _id of the inserted data key document.
        """
        # insert does not return the inserted _id when given a RawBSONDocument.
        doc = _bson_to_dict(data_key, _DATA_KEY_OPTS)
        if not isinstance(doc.get('_id'), uuid.UUID):
            raise TypeError(
                'data_key _id must be a bson.binary.Binary with subtype 4')
        res = self.key_vault_coll.insert_one(doc)
        return Binary(res.inserted_id.bytes, subtype=UUID_SUBTYPE)
Insert a data key into the key vault.

        :Parameters:
          - `data_key`: The data key document to insert.

        :Returns:
          The _id of the inserted data key document.
        
stackoverflow/venv/lib/python3.6/site-packages/pymongo/encryption.py