def METHOD_NAME(self, path):
    if self.system_hgrc is None:
        system_hgrc_path = self.mktemp("hgrc")
        with open(system_hgrc_path, "w") as f:
            f.write(hgrepo.HgRepository.get_system_hgrc_contents())
        self.system_hgrc = system_hgrc_path
    return hgrepo.HgRepository(path, system_hgrc=self.system_hgrc)