def _user_written_stack_frame():
    """get the frame of first stack frame outside Viscid"""
    import inspect
    import os
    stack = inspect.stack()
    frame_info = None
    for frame_info in stack:
        if 'viscid' not in os.path.normpath(frame_info[1]):
            break
    return frame_info
