def from_dict(cls, d):
        """
        Create an instance from a dictionary.
        """
        assert isinstance(d, dict)
        init_args = dict()
        for key, is_required in cls.dictionary_attributes.iteritems():
            try:
                init_args[key] = d[key]
            except KeyError:
                if is_required:
                    raise DictConvertible.Error('missing key in dictionary', cls, missing_key=key)
        return cls(**init_args)
Create an instance from a dictionary.