def METHOD_NAME(cls, model_class, *args, **kwargs):
    parent = kwargs.pop("parent")
    if cls._meta.django_get_or_create:
        instance = cls._get_or_create(model_class, *args, parent=parent, **kwargs)
    else:
        instance = cls._create_instance(model_class, parent, kwargs)
        assert instance.pk
    return instance