<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def remove_unnecessary_self_time_nodes(frame, options):
    '''
    When a frame has only one child, and that is a self-time frame, remove that node, since it's
    unnecessary - it clutters the output and offers no additional information.
    '''
    if frame is None:
        return None

    if len(frame.children) == 1 and isinstance(frame.children[0], SelfTimeFrame):
        child = frame.children[0]
        frame.self_time += child.self_time
        child.remove_from_parent()
    
    for child in frame.children:
        remove_unnecessary_self_time_nodes(child, options=options)
    
    return frame