def write_metadata(pid, n, data):
"""
Write an autogenerated problem's instance metadata.
This includes any fields to be overwritten from
the original problem object.
Args:
pid: the problem id
n: the instance number
data: the metadata object
"""
metadata_path = get_metadata_path(pid, n)
with open(metadata_path, "w") as f:
f.write(json_util.dumps(data))
评论列表
文章目录