def _spawn_nailgun_server(self, fingerprint, jvm_options, classpath, stdout, stderr):
    # Truncate the nailguns stdout & stderr.
    safe_file_dump(self._ng_stdout, '')
    safe_file_dump(self._ng_stderr, '')

    jvm_options = jvm_options + [self._PANTS_NG_BUILDROOT_ARG,
                                 self._create_owner_arg(self._workdir),
                                 self._create_fingerprint_arg(fingerprint)]

    post_fork_child_opts = dict(fingerprint=fingerprint,
                                jvm_options=jvm_options,
                                classpath=classpath,
                                stdout=stdout,
                                stderr=stderr)

    logger.debug('Spawning nailgun server {i} with fingerprint={f}, jvm_options={j}, classpath={cp}'
                 .format(i=self._identity, f=fingerprint, j=jvm_options, cp=classpath))

    self.daemon_spawn(post_fork_child_opts=post_fork_child_opts)

    # Wait for and write the port information in the parent so we can bail on exception/timeout.
    self.await_pid(self._connect_timeout)
    self.write_socket(self._await_socket(self._connect_timeout))

    logger.debug('Spawned nailgun server {i} with fingerprint={f}, pid={pid} port={port}'
                 .format(i=self._identity, f=fingerprint, pid=self.pid, port=self.socket))

    client = self._create_ngclient(self.socket, stdout, stderr)
    self.ensure_connectable(client)

    return client
Generate a test method
dataset/ETHPy150Open pantsbuild/pants/src/python/pants/java/nailgun_executor.py/NailgunExecutor._spawn_nailgun_server--crossover with--dataset/ETHPy150Open mattrobenolt/proofread/proofread/base.py/make_test