def METHOD_NAME(self, params):
    name = params["name"]
    description = params.get("description", None)
    project = params["project"]
    number = max([obj.number for obj in Version.objects.filter(project=project)]) + 1
    obj = Version(
        name=name,
        description=description,
        show_empty=params["show_empty"],
        number=number,
        project=Project.objects.get(pk=project),
        created_by=self.request.user,
        elemental_id=params.get("elemental_id", uuid.uuid4()),
    )
    obj.save()
    if "bases" in params:
        qs = Version.objects.filter(pk__in=params["bases"])
        if qs.count() < len(params["bases"]):
            obj.delete()
            raise ObjectDoesNotExist
        else:
            obj.bases.set(qs)
    return {"message": "Created version successfully!", "id": obj.id}