def _get_state(inspect_results):
    """
    Helper for deriving the current state of the container from the inspect
    results.
    """
    if inspect_results.get("State", {}).get("Paused", False):
        return "paused"
    elif inspect_results.get("State", {}).get("Running", False):
        return "running"
    else:
        return "stopped"