Generates an ion object from a dict created by as_dict().

        Args:
            d:
                {symbol: amount} dict.
979753
def from_dict(cls, d):
        
        charge = d.pop('charge')
        composition = Composition(d)
        return Ion(composition, charge)
662058
def fromdict(dict):
        
        self = Proof()
        self.mu = dict["mu"]
        self.sigma = dict["sigma"]
        return self
1032023
def from_dict(d):
        
        return ISA(
            qubits=sorted([Qubit(id=int(qid),
                                 type=q.get("type", DEFAULT_QUBIT_TYPE),
                                 dead=q.get("dead", False))
                           for qid, q in d["1Q"].items()],
                          key=lambda qubit: qubit.id),
            edges=sorted([Edge(targets=[int(q) for q in eid.split('-')],
                               type=e.get("type", DEFAULT_EDGE_TYPE),
                               dead=e.get("dead", False))
                          for eid, e in d["2Q"].items()],
                         key=lambda edge: edge.targets),
        )
970840
def to_d(l):
    
    _d = {}
    for x in l:
        for k, v in x.items():
            _d[k] = v
    return _d
464071
def from_dict(cls, d):
        
        o = super(DistributionList, cls).from_dict(d)
        o.members = []
        if 'dlm' in d:
            o.members = [utils.get_content(member)
                         for member in utils.as_list(d["dlm"])]
        return o
1338656
def prefix_dict_keys(d: Dict[str, Any], prefix: str) -> Dict[str, Any]:
    
    result = {}  # type: Dict[str, Any]
    for k, v in d.items():
        result[prefix + k] = v
    return result
1278105
def from_dict(cls, d):
        
        makepred, charspan = Pred.surface_or_abstract, Lnk.charspan
        top = d.get('top')
        nodes, edges = [], []
        for nid, node in d.get('nodes', {}).items():
            props = node.get('properties', {})
            if 'type' in node:
                props[CVARSORT] = node['type']
            if not props:
                props = None
            lnk = None
            if 'lnk' in node:
                lnk = charspan(node['lnk']['from'], node['lnk']['to'])
            nodes.append(
                Node(
                    nodeid=nid,
                    pred=makepred(node['label']),
                    sortinfo=props,
                    lnk=lnk,
                    carg=node.get('carg')
                )
            )
            edges.extend(
                (nid, rargname, tgtnid)
                for rargname, tgtnid in node.get('edges', {}).items()
            )
        nodes.sort(key=lambda n: (n.cfrom, -n.cto))
        return cls(top, nodes=nodes, edges=edges)
144722
def from_dict(cls, a_dict: Mapping[str, Any]) -> "HistogramBase":
        
        kwargs = cls._kwargs_from_dict(a_dict)
        return cls(**kwargs)
1193754
def from_dict(cls, d):
        
        result = OptionHandler(cls.new_instance(d["class"]))
        result.options = split_options(d["options"])
        return result
1095622
def from_dict(cls, d):
        
        s = Structure.from_dict(d)
        return cls(s, history=d["history"],
                   other_parameters=d.get("other_parameters", None))
245512
def from_dict(cls, d):
        
        sites = [Site.from_dict(sd) for sd in d["sites"]]
        charge = d.get("charge", 0)
        spin_multiplicity = d.get("spin_multiplicity")
        return cls.from_sites(sites, charge=charge, spin_multiplicity=spin_multiplicity)
249075
def _dict_value_to_pairs(d):
    
    d = d[tz.first(d)]

    for k, v in d.items():
        yield {k: v}
16282
def from_dict(cls, d):
        
        conf = {}
        for k in d["config"]:
            v = d["config"][k]
            if isinstance(v, dict):
                conf[str(k)] = get_dict_handler(d["config"]["type"])(v)
            else:
                conf[str(k)] = v
        return get_class(str(d["class"]))(config=conf)
329013
def from_dict(cls, d):
        """"""
        phone = super(cls, cls).from_dict(d)
        phone.display = d.get('display', u'')
        phone.display_international = d.get('display_international', u'')
        return phone
779616
def from_dict(cls, d):
        
        o = super(Signature, cls).from_dict(d)
        if 'content' in d:
            # Sometimes, several contents, (one txt, other  html), take last
            try:
                o._content = d['content']['_content']
                o._contenttype = d['content']['type']
            except TypeError:
                o._content = d['content'][-1]['_content']
                o._contenttype = d['content'][-1]['type']

        return o
264299
def from_dict(ddict):
        
        d = Definition(ddict['name'], ddict['line'], ddict['column'],
                       ddict['icon'], ddict['description'],
                       ddict['user_data'], ddict['path'])
        for child_dict in ddict['children']:
            d.children.append(Definition.from_dict(child_dict))
        return d
320058
def _from_dict(cls, _dict):
        """"""
        args = {}
        if 'cell_id' in _dict:
            args['cell_id'] = _dict.get('cell_id')
        if 'location' in _dict:
            args['location'] = Location._from_dict(_dict.get('location'))
        if 'text' in _dict:
            args['text'] = _dict.get('text')
        if 'row_index_begin' in _dict:
            args['row_index_begin'] = _dict.get('row_index_begin')
        if 'row_index_end' in _dict:
            args['row_index_end'] = _dict.get('row_index_end')
        if 'column_index_begin' in _dict:
            args['column_index_begin'] = _dict.get('column_index_begin')
        if 'column_index_end' in _dict:
            args['column_index_end'] = _dict.get('column_index_end')
        if 'row_header_ids' in _dict:
            args['row_header_ids'] = [
                RowHeaderIds._from_dict(x)
                for x in (_dict.get('row_header_ids'))
            ]
        if 'row_header_texts' in _dict:
            args['row_header_texts'] = [
                RowHeaderTexts._from_dict(x)
                for x in (_dict.get('row_header_texts'))
            ]
        if 'row_header_texts_normalized' in _dict:
            args['row_header_texts_normalized'] = [
                RowHeaderTextsNormalized._from_dict(x)
                for x in (_dict.get('row_header_texts_normalized'))
            ]
        if 'column_header_ids' in _dict:
            args['column_header_ids'] = [
                ColumnHeaderIds._from_dict(x)
                for x in (_dict.get('column_header_ids'))
            ]
        if 'column_header_texts' in _dict:
            args['column_header_texts'] = [
                ColumnHeaderTexts._from_dict(x)
                for x in (_dict.get('column_header_texts'))
            ]
        if 'column_header_texts_normalized' in _dict:
            args['column_header_texts_normalized'] = [
                ColumnHeaderTextsNormalized._from_dict(x)
                for x in (_dict.get('column_header_texts_normalized'))
            ]
        if 'attributes' in _dict:
            args['attributes'] = [
                Attribute._from_dict(x) for x in (_dict.get('attributes'))
            ]
        return cls(**args)