def _get_stackframe_filename(frame):
    """Return the filename component of a traceback frame."""
    # Python 3 has a frame.filename variable, but frames in
    # Python 2 are just tuples. This code works in both versions.
    return frame[0]