<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cut_from_chain(sciobj_model):
 """Remove an object from a revision chain. The object can be at any location in the chain, including the head or tail. Preconditions: - The object with the pid is verified to exist and to be a member of an revision chain. E.g., with: d1_gmn.app.views.asserts.is_existing_object(pid) d1_gmn.app.views.asserts.is_in_revision_chain(pid) Postconditions: - The given object is a standalone object with empty obsoletes, obsoletedBy and seriesId fields. - The previously adjacent objects in the chain are adjusted to close any gap that was created or remove dangling reference at the head or tail. - If the object was the last object in the chain and the chain has a SID, the SID reference is shifted over to the new last object in the chain. """

    if _is_head(sciobj_model):
        old_pid = sciobj_model.obsoletes.did
        _cut_head_from_chain(sciobj_model)
    elif _is_tail(sciobj_model):
        old_pid = sciobj_model.obsoleted_by.did
        _cut_tail_from_chain(sciobj_model)
    else:
        old_pid = sciobj_model.obsoleted_by.did
        _cut_embedded_from_chain(sciobj_model)
    _update_sid_to_last_existing_pid_map(old_pid)