code: def from_yaml(cls, path):
          
          import yaml
  
          with path.open(mode='r') as fp:
              source = yaml.safe_load(fp) or {}
              self = cls.from_jsonld(
                  source,
                  __reference__=path,
                  __source__=deepcopy(source),
              )
  
          return self
docs: Return an instance from a YAML file.