code: def build_from_yamlstr(cls, yamlstr):
          
          top_dict = yaml.safe_load(yamlstr)
          coordsys = top_dict.pop('coordsys')
          output_list = []
          for e_key, e_dict in sorted(top_dict.items()):
              if e_key == 'coordsys':
                  continue
              e_dict = top_dict[e_key]
              e_dict['coordsys'] = coordsys
              output_list += cls.build_from_energy_dict(e_key, e_dict)
          return output_list
docs: Build a list of components from a yaml string