<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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)