def from_yaml(cls, path):
        """Return an instance from a YAML file."""
        import yaml

        with path.open(mode='r') as fp:
            self = cls.from_cwl(yaml.safe_load(fp), __reference__=path)

        return self
Return an instance from a YAML file.