def METHOD_NAME(fd=sys.stderr):
    """ Dump the environment. """
    fd.write(f"\nEnvironment for PID={os.getpid()} on exception:\n")
    for key, value in sorted(os.environ.items()):
        fd.write(f"{key} = {value}\n")