import re


def _redact_volatile(output: str) -> str:
    """
    Replace some volatile values, like temp paths & memory locations.

    >>> _redact_volatile("<__main__.A at 0x10b80ce50>")
    '<__main__.A at 0x...>'

    >>> _redact_volatile("/tmp/abcd234/pytest-accept-test-temp-file-0.py")
    '/tmp/.../pytest-accept-test-temp-file-0.py'

    """
    mem_locations = re.sub(r" 0x[0-9a-fA-F]+", " 0x...", output)
    temp_paths = re.sub(r"/tmp/[0-9a-fA-F]+", "/tmp/...", mem_locations)
    return temp_paths