def METHOD_NAME(keymap_data):
    # Validate to ensure we don't have to deal with bad data - handles stdin/file
    validate(keymap_data, 'qmk.keymap.v1')
    kb_name = keymap_data['keyboard']
    km_name = keymap_data['keymap']
    km_folder = keymaps(kb_name)[0] / km_name
    keyboard_keymap = km_folder / 'keymap.json'
    # This is the deepest folder in the expected tree
    keyboard_keymap.parent.mkdir(parents=True, exist_ok=True)
    # Dump out all those lovely files
    keyboard_keymap.write_text(json.dumps(keymap_data, cls=KeymapJSONEncoder, sort_keys=True))
    return (kb_name, km_name)