code: def rdf_graph_from_yaml(yaml_root):
      
      G = Graph()
      for top_entry in yaml_root:
          assert len(top_entry) == 1
          node = list(top_entry.keys())[0]
          build_relations(G, node, top_entry[node], None)
      return G
docs: Convert the YAML object into an RDF Graph object.