def METHOD_NAME(db):
    attribute = Attribute.objects.get(uri='http://example.com/terms/domain/individual/single/text')
    attribute.locked = True
    attribute.save()
    AttributeLockedValidator(attribute)({
        'uri_prefix': attribute.uri_prefix,
        'key': attribute.key,
        'parent':  attribute.parent,
        'locked': False
    })