code: def load_manifest(data):
      
      if isinstance(data, dict):
          return data
      doc = yaml.safe_load(data)
      if not isinstance(doc, dict):
          raise Exception("Manifest didn't result in dict.")
      return doc
docs: Helper for loading a manifest yaml doc.