def _merge_fields_and_pk(pk, fields):
    """
    Tweaked variant of DRF's model_meta function to accommodate for
    abstract models

    Used by EmbeddedModelFields and EmbeddedModelSerializers
    """
    fields_and_pk = {}
    fields_and_pk['pk'] = pk
    if pk is not None:
        fields_and_pk[pk.name] = pk
    fields_and_pk.update(fields)
    return fields_and_pk
