code: def write_pid_file():
      with open("/tmp/mars-service.pid", "w") as pid_file:
          pid_file.write(str(os.getpid()))
  
file_path: mars/mars/deploy/kubernetes/core.py
imports: import asyncio
  import logging
  import os
  from typing import AsyncGenerator, Dict, List, Optional, TypeVar
  from ...services.cluster import WebClusterAPI
  from ...services.cluster.backends import register_cluster_backend, AbstractClusterBackend
  from ...services.cluster.core import NodeRole
  from ..utils import wait_all_supervisors_ready, next_in_thread
  from .config import MarsReplicationConfig
label_desc: Use image node_id 1 for calling the K8SServiceMixin obj's underlying member method code with example usage: obj.write_pid_file() without return types