Assign persistent identifier.

def assign(pid_type, pid_value, status, object_type, object_uuid, overwrite):
    """Assign persistent identifier."""
    from .models import PersistentIdentifier
    obj = PersistentIdentifier.get(pid_type, pid_value)
    if status is not None:
        obj.status = status
    obj.assign(object_type, object_uuid, overwrite=overwrite)
    db.session.commit()
    click.echo(obj.status)