code: def kill(container, rm=True):
      '''
      Kill a container
  
      Args:
          * container: Container name or ID
          * rm=True: Remove the container or not
      '''
      container = get_container(container)
      if not container:
          raise Exception('No such container: %s' % container)
      unbind_all(container['ip']) # legacy, only here for backwards compatibility
  
      sudo('docker kill %s' % container['name'])
      if rm:
          sudo('docker rm %s' % container['name']f kill(container, rm=True):
      '''
      Kill a container
  
      Args:
          * container: Container name or ID
          * rm=True: Remove the container or not
      '''
      container = get_container(container)
      if not container:
          raise Exception('No such container: %s' % container)
      unbind_all(container['ip']) # legacy, only here for backwards compatibility
  
      sudo('docker kill %s' % container['name'])
      if rm:
          sudo('docker rm %s' % container['name'])
docs: Kill a container
  
      Args:
          * container: Container name or ID
          * rm=True: Remove the container or not