def METHOD_NAME(self):
    key = id(self), get_ident()
    if key in repr_running:
        return fillvalue
    repr_running.add(key)
    try:
        result = user_function(self)
    finally:
        repr_running.discard(key)
    return result