code: def loads(s, cls=None, **kwargs):
      
      if not isinstance(s, string_types):
          raise TypeError('the YAML object must be str, not {0!r}'.format(s.__class__.__name__))
  
      cls = cls or YAMLDecoder
      return cls(**kwargs).decode(s)
docs: Load string