def _assign_data(data, source_file, content):
        """Helper to iterate through all docs in a file"""
        content = tuple(content)
        if len(content) == 1:
            data[source_file] = content[0]
        elif len(content) > 1:
            for i, doc in enumerate(content):
                data[f"{source_file}[{i}]"] = doc
Helper to iterate through all docs in a file
dynaconf/loaders/yaml_loader.py