code: def kill(pid, host=None, **kwds):
      """kill a process (possibly) on a remote host
  
      Args:
          pid   -- process id
          host  -- hostname where process is running [default = None (i.e. locally)]
      """
      # XXX: launcher has "kill self" method; use it? note that this is different?
      command = "kill -n TERM %s" % pid  # XXX: use TERM=15 or KILL=9 ?
      getpid(
          pid, host
      )  # throw error if pid doesn't exist #XXX: bad idea?
      response = execute(command, host, bg=False, **kwds).response()
      return response
  
file_path: pathos/pathos/core.py
imports: import os
  import string
  import re
  import pathos
label_desc: Use image node_id 3 for calling a global function with example usage: kill(pid, host) and returns: response