code: def exists(name):
      '''
      Returns true if the named container exists
  
      CLI Example:
  
      .. code-block:: bash
  
          salt myminion nspawn.exists <name>
      '''
      contextkey = 'nspawn.exists.{0}'.format(name)
      if contextkey in __context__:
          return __context__[contextkey]
      __context__[contextkey] = name in list_all()
      return __context__[contextkeyf exists(name):
      '''
      Returns true if the named container exists
  
      CLI Example:
  
      .. code-block:: bash
  
          salt myminion nspawn.exists <name>
      '''
      contextkey = 'nspawn.exists.{0}'.format(name)
      if contextkey in __context__:
          return __context__[contextkey]
      __context__[contextkey] = name in list_all()
      return __context__[contextkey]
docs: Returns true if the named container exists
  
      CLI Example:
  
      .. code-block:: bash
  
          salt myminion nspawn.exists <name>