def METHOD_NAME(dag: DAG):
    output_artifact_id = None
    for id in dag.artifacts:
        if dag.artifacts[id].name == artifact_name:
            output_artifact_id = id
            break
    if output_artifact_id is None:
        raise Exception("Unable to find output artifact from the dag.")
    status = ExecutionStatus.SUCCEEDED
    if serialization_type == SerializationType.TABLE:
        serialized_content = content.to_json(
            orient="table", date_format="iso", index=False
        ).encode()
    elif serialization_type == SerializationType.JSON:
        serialized_content = json.dumps(content).encode()
    else:
        raise Exception("Unexpected serialization type %s." % serialization_type)
    artifact_results = {
        output_artifact_id: ArtifactResult(
            serialization_type=serialization_type,
            artifact_type=artifact_type,
            content=serialized_content,
        ),
    }
    return PreviewResponse(
        status=status,
        operator_results={},
        artifact_results=artifact_results,
    )