def METHOD_NAME(tmp_path):
    class Sandbox:
        pass
    o = Sandbox()
    e = os.environ.copy()
    with contextlib.suppress(KeyError):
        del os.environ["PINT_CLOCK_OVERRIDE"]
    with contextlib.suppress(KeyError):
        del os.environ["TEMPO"]
    with contextlib.suppress(KeyError):
        del os.environ["TEMPO2"]
    o.override_dir = tmp_path / "override"
    o.override_dir.mkdir()
    o.repo_dir = tmp_path / "repo"
    o.repo_dir.mkdir()
    o.clocks = [
        ClockFile(mjd=np.array([50000 + i, 59000]), clock=np.zeros(2) * u.us)
        for i in range(10)
    ]
    o.name = "fake.clk"
    o.hdrline = "# FAKE1 FAKE2"
    o.override_clock = o.clocks[0]
    o.override_clock_file = o.override_dir / o.name
    with o.override_clock_file.open("wt") as f:
        o.override_clock.write_tempo2_clock_file(f, hdrline=o.hdrline)
    o.repo_clock = o.clocks[1]
    o.repo_clock_file = o.repo_dir / "T2runtime" / "clock" / o.name
    o.repo_clock_file.parent.mkdir(parents=True)
    with o.repo_clock_file.open("wt") as f:
        o.repo_clock.write_tempo2_clock_file(f, hdrline=o.hdrline)
    (o.repo_dir / "index.txt").write_text(
        """
        # File                                   Update (days)   Invalid if older than
        T2runtime/clock/fake.clk                 7.0   ---
        """
    )
    o.repo_uri = f"{o.repo_dir.as_uri()}/"
    o.t2_dir = tmp_path / "t2"
    o.t2_clock = o.clocks[2]
    o.t2_clock_file = o.t2_dir / "clock" / o.name
    o.t2_clock_file.parent.mkdir(parents=True)
    with o.t2_clock_file.open("wt") as f:
        o.t2_clock.write_tempo2_clock_file(f, hdrline=o.hdrline)
    try:
        yield o
    finally:
        os.environ = e