<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ephemeral(*, port: int = 6060, timeout_connection: int = 30, verbose: bool = False ) -> Iterator[Client]: """ Launches an ephemeral server instance that will be immediately close when no longer in context. Parameters: port: the port that the server should run on. verbose: if set to True, the server will print its output to the stdout, otherwise it will remain silent. Returns: a client for communicating with the server. """

    url = "http://127.0.0.1:{}".format(port)
    cmd = ["bugzood", "--debug", "-p", str(port)]
    try:
        stdout = None if verbose else subprocess.DEVNULL
        stderr = None if verbose else subprocess.DEVNULL
        proc = subprocess.Popen(cmd,
                                preexec_fn=os.setsid,
                                stdout=stdout,
                                stderr=stderr)
        yield Client(url, timeout_connection=timeout_connection)
    finally:
        os.killpg(proc.pid, signal.SIGTERM)