def METHOD_NAME(self):
    # Pre clone the repo into a temporary directory.
    tmpdir = tmp.tmpdir()
    local_directory = git.clone(
        "https://github.com/googleapis/nodejs-vision.git", tmpdir
    )
    # Write out a preclone map.
    preconfig_path = tmpdir / "preconfig.json"
    preconfig = Preconfig()
    preconfig.precloned_repos[
        "https://github.com/googleapis/nodejs-vision.git"
    ] = str(local_directory)
    preconfig_path.write_text(google.protobuf.json_format.MessageToJson(preconfig))
    # Reload the module so it reexamines the environment variable.
    importlib.reload(synthtool.preconfig)
    metadata.reset()
    # Confirm calling clone with the preclone map returns the precloned local directory.
    os.environ[synthtool.preconfig.PRECONFIG_ENVIRONMENT_VARIABLE] = str(
        preconfig_path
    )
    same_local_directory = git.clone(
        "https://github.com/googleapis/nodejs-vision.git"
    )
    self.assertEqual(local_directory, same_local_directory)
    # Make sure it was recorded in the metadata.
    self.assertEqual("nodejs-vision", metadata.get().sources[0].git.name)