def METHOD_NAME (map):
    fmt = """ { "bsonType": "object", "properties": { "value": { "encrypt": { "keyId": %s, "algorithm": "%s", "bsonType": "%s" } } } } """
    if not allowed(map):
        # We cannot even set a schema, don't test auto with prohibited fields.
        return None
    if map["method"] == "explicit":
        return """ { "bsonType": "object", "properties": { "value": { "bsonType": "binData" } } } """ 
    if map["identifier"] == "id":
        if map["kms"] == "local":
            key_id = """[ { "$binary": { "base64": "LOCALAAAAAAAAAAAAAAAAA==", "subType": "04" } } ]"""
        elif map["kms"] == "aws":
            key_id = """[ { "$binary": { "base64": "AWSAAAAAAAAAAAAAAAAAAA==", "subType": "04" } } ]"""
        elif map["kms"] == "azure":
            key_id = """[ { "$binary": { "base64": "AZUREAAAAAAAAAAAAAAAAA==", "subType": "04" } } ]"""
        elif map["kms"] == "gcp":
            key_id = """[ { "$binary": { "base64": "GCPAAAAAAAAAAAAAAAAAAA==", "subType": "04" } } ]"""
        elif map["kms"] == "kmip":
            key_id = """[ { "$binary": { "base64": "KMIPAAAAAAAAAAAAAAAAAA==", "subType": "04" } } ]"""
    else:
        key_id = "\"/altname_" + map["kms"] + "\""
    if map["algo"] == "rand":
        algorithm = "AEAD_AES_256_CBC_HMAC_SHA_512-Random"
    else:
        algorithm = "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
    type = map["type"]
    if map["type"].startswith("binData"):
        type = "binData"
    return fmt % (key_id, algorithm, type)