class_docstr: Manager for backend model objects
docstr: Unwrap design text from a dictionary.
  
  In the backend, the design is a dictionary with a 'design' key in it.
  For the client, it is a text. This function unwraps a design string from
  the dictionary.
  
  :param design: If it is a dictionary with a 'design' key in it, return
      design['design'].
      If it is a dictionary without 'design' key, return the first value
      in it's values list.
      If it is an empty dictionary, None, or any other False value,
      return an empty string.
      If it is a string, return design as-is.
  
  :return: The design string according to design parameter.
docstr_tok: ["Unwrap","design","text","from","a","dictionary",".","In","the","backend",",","the","design","is","a","dictionary","with","a","'design","'","key","in","it",".","For","the","client",",","it","is","a","text",".","This","function","unwraps","a","design","string","from","the","dictionary",".",":","param","design",":","If","it","is","a","dictionary","with","a","'design","'","key","in","it",",","return","design","[","'design","'","]",".","If","it","is","a","dictionary","without","'design","'","key",",","return","the","first","value","in","it","'s","values","list",".","If","it","is","an","empty","dictionary",",","None",",","or","any","other","False","value",",","return","an","empty","string",".","If","it","is","a","string",",","return","design","as-is",".",":","return",":","The","design","string","according","to","design","parameter","."]
code: def _unwrap_design(design):
      """
      Unwrap design text from a dictionary.
  
      In the backend, the design is a dictionary with a 'design' key in it.
      For the client, it is a text. This function unwraps a design string from
      the dictionary.
  
      :param design: If it is a dictionary with a 'design' key in it, return
          design['design'].
          If it is a dictionary without 'design' key, return the first value
          in it's values list.
          If it is an empty dictionary, None, or any other False value,
          return an empty string.
          If it is a string, return design as-is.
  
      :return: The design string according to design parameter.
      """
      if not design:
          return ""
  
      if isinstance(design, six.string_types):
          return design
  
      if isinstance(design, dict):
          if "design" in design:
              return design["design"]
  
          return list(design.values())[0]
  
      raise ValueError(
          "design must be a string or a dictionary with at least one value"
      )
  
imports: from collections import namedtuple
  from functools import partial
  import six
  from pathlib2 import Path
  from .base import IdObjectBase
  from .util import make_message
  from ..backend_api import Session
  from ..backend_api.services import models, tasks
  from ..storage import StorageManager
  from ..storage.helper import StorageHelper
  from ..utilities.async_manager import AsyncManagerMixin
label_desc: Use image node_id 10 for calling the Model obj's underlying member method code with example usage: obj._unwrap_design(design) and returns: str, design, list, design