def generate_yaml_template(base_yaml, slots_proto):
    "\n    Args:\n        base_yaml: A string representation of one type job's base yaml.\n        slots_proto: A proto map object representation of modification\n        template's operable smallest units.\n    Returns:\n        string: A yaml_template\n    "
    slots = {}
    for key in slots_proto:
        if (slots_proto[key].reference_type == Slot.ReferenceType.DEFAULT):
            slots[key] = slots_proto[key].default
        else:
            slots[key] = f'${{{slots_proto[key].reference}}}'
    return format_yaml(base_yaml, **slots)
Args:
    base_yaml: A string representation of one type job's base yaml.
    slots_proto: A proto map object representation of modification
    template's operable smallest units.
Returns:
    string: A yaml_template
def generate_yaml_template(base_yaml, slots_proto):
    "\n    Args:\n        base_yaml: A string representation of one type job's base yaml.\n        slots_proto: A proto map object representation of modification\n        template's operable smallest units.\n    Returns:\n        string: A yaml_template\n    "
    slots = {}
    for key in slots_proto:
        if (slots_proto[key].reference_type == Slot.ReferenceType.DEFAULT):
            slots[key] = slots_proto[key].default
        else:
            slots[key] = f'${{{slots_proto[key].reference}}}'
    return format_yaml(base_yaml, **slots)