code: def state(name):
      '''
      Returns the state of the container
  
      name
          Container name or ID
  
  
      **RETURN DATA**
  
      A string representing the current state of the container (either
      ``running``, ``paused``, or ``stopped``)
  
  
      CLI Example:
  
      .. code-block:: bash
  
          salt myminion docker.state mycontainer
      '''
      contextkey = 'docker.state.{0}'.format(name)
      if contextkey in __context__:
          return __context__[contextkey]
      __context__[contextkey] = _get_state(inspect_container(name))
      return __context__[contextkeyf state(name):
      '''
      Returns the state of the container
  
      name
          Container name or ID
  
  
      **RETURN DATA**
  
      A string representing the current state of the container (either
      ``running``, ``paused``, or ``stopped``)
  
  
      CLI Example:
  
      .. code-block:: bash
  
          salt myminion docker.state mycontainer
      '''
      contextkey = 'docker.state.{0}'.format(name)
      if contextkey in __context__:
          return __context__[contextkey]
      __context__[contextkey] = _get_state(inspect_container(name))
      return __context__[contextkey]
docs: Returns the state of the container
  
      name
          Container name or ID
  
  
      **RETURN DATA**
  
      A string representing the current state of the container (either
      ``running``, ``paused``, or ``stopped``)
  
  
      CLI Example:
  
      .. code-block:: bash
  
          salt myminion docker.state mycontainer