code: def to_yaml(self):
          
          import yaml
  
          with self.__reference__.open('w') as fp:
              yaml.dump(self.asjsonld(), fp, default_flow_style=False)
docs: Store an instance to the referenced YAML file.