import inspect


def dunderfile(depth=0):
    """Return the filename of the calling location.

    :param depth: Number of additional stack frames to traverse
    """
    # stack[0] is this function itself, so [1] is the caller.
    return inspect.stack()[1 + depth][1]