def METHOD_NAME(instance: Model, using: str | None = None, **kwargs: Any) -> int:
    """
    Updates specified attributes on the current instance.
    """
    assert instance.pk, "Cannot update an instance that has not yet been created."
    using = using or router.db_for_write(instance.__class__, instance=instance)
    for field in instance._meta.fields:
        if getattr(field, "auto_now", False) and field.name not in kwargs:
            kwargs[field.name] = field.pre_save(instance, False)
    affected = instance.__class__._base_manager.using(using).filter(pk=instance.pk).METHOD_NAME(**kwargs)
    for k, v in kwargs.items():
        setattr(instance, k, _handle_value(instance, v))
    if affected == 1:
        post_save.send(sender=instance.__class__, instance=instance, created=False)
        return affected
    elif affected == 0:
        return affected
    elif affected < 0:
        raise ValueError(
            "Somehow we have updated a negative number of rows. You seem to have a problem with your db backend."
        )
    else:
        raise ValueError("Somehow we have updated multiple rows. This is very, very bad.")