def METHOD_NAME(rucio_path, did, content: dict):
    md_did = f'{did}-metadata.json'
    md_path = straxen.storage.rucio_local.rucio_path(rucio_path, md_did)
    os.makedirs(os.path.split(md_path)[0], exist_ok=True)
    with open(md_path, mode='w') as f:
        f.write(json.dumps(content, default=json_util.default))