def METHOD_NAME(records, **_):
    """Format dataset files as JSON-LD.
    Args:
        records: Filtered collection.
    """
    from renku.command.format.json import dumps
    from renku.command.schema.dataset import DatasetFileSchema
    data = [DatasetFileSchema(flattened=True).dump(record) for record in records]
    return dumps(data, indent=2)