def METHOD_NAME(path):
    '''Load domains from a domains.yaml.
    If domains.yaml is not found, then a single 'app' domain referring to the
    top-level build folder is created and returned.
    '''
    domains_file = Path(path) / 'domains.yaml'
    if not domains_file.is_file():
        return Domains.from_data({'default': 'app',
                                  'build_dir': path,
                                  'domains': [{'name': 'app', 'build_dir': path}]})
    return Domains.from_file(domains_file)