def METHOD_NAME(debugger, command, result, internal_dict):
    """
    Use this command inside a watchpoint to append
    (1) an 8-byte integer value stored at the given address and
    (2) a stack trace
    to the filename provided.
    This is useful for determining where loose or cyclic shared_ptr<>
    references are being created.
    Syntax:
        useCountTrace address filename [size]
    where
        address    is the address of the shared-pointer use count.
                   This is returned by useCountWatch.
        filename   is the name of a text file to which the information
                   listed above should be appended.
        size       is the number of bytes in the integer use-count.
                   The value you should use is reported by useCountWatch.
    See the help for useCountWatch for an example.
    """
    args = command.split(' ')
    stream = lldb.SBStream()
    err = lldb.SBError()
    proc = debugger.GetSelectedTarget().process
    stream.RedirectToFile(args[1] if len(args) > 1 else '/tmp/trace.txt', True)
    addr = int(args[0], 0)
    ucs = int(args[2]) if len(args) > 2 else 8
    ctr = proc.ReadUnsignedFromMemory(addr, ucs, err)
    if err.Success():
        stream.write('---- %8d\n' % ctr)
    else:
        stream.write('---- ## %s\n' % str(err))
    # print(dir(lldb.process.threads))
    thr = proc.GetSelectedThread()
    thr.GetDescription(stream)
    for x in range(thr.GetNumFrames()):
        thr.GetFrameAtIndex(x).GetDescription(stream)
    # We would like to continue here, but calling proc.Continue()
    # does not continue execution on exit but rather continues
    # within this block until the next breakpoint/watch (i.e.,
    # calls to continue are nested recursively until the stack
    # is exhausted).