def loads ( cls , s ) : with closing ( StringIO ( s ) ) as fileobj : return cls . load ( fileobj )
python init obj from string
Load an instance of this class from YAML .
def loads(cls, s):
        """
        Load an instance of this class from YAML.

        """
        with closing(StringIO(s)) as fileobj:
            return cls.load(fileobj)