<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def save(output_dir, converter, json_topology, snapshot, quiet):
 """ Save the converted topology :param str output_dir: Output Directory :param Converter converter: Converter instance :param JSONTopology json_topology: JSON topology layout :param bool snapshot: Is this a snapshot? :param bool quiet: No console printing """

    try:
        old_topology_dir = topology_dirname(converter.topology)

        if output_dir:
            output_dir = os.path.abspath(output_dir)
        else:
            output_dir = os.getcwd()

        topology_name = json_topology.name
        topology_files_dir = os.path.join(output_dir, topology_name + '-files')

        if snapshot:
            snap_name = snapshot_name(converter.topology)
            output_dir = os.path.join(topology_files_dir, 'snapshots',
                                      snap_name)
            topology_files_dir = os.path.join(output_dir, topology_name +
                                              '-files')

        # Prepare the directory structure
        if not os.path.exists(output_dir):
            os.makedirs(output_dir)

        # Move the dynamips config files to the new topology folder
        config_err = copy_configs(converter.configs, old_topology_dir,
                                  topology_files_dir)

        # Copy any VPCS configurations to the the new topology
        copy_vpcs_configs(old_topology_dir, topology_files_dir)

        # Copy the topology images to the new topology
        copy_topology_image(old_topology_dir, output_dir)

        # Copy the instructions to the new topology folder
        if not snapshot:
            copy_instructions(old_topology_dir, output_dir)

        # Move the image files to the new topology folder
        image_err = copy_images(converter.images, old_topology_dir,
                                topology_files_dir)

        # Create the vbox working directories
        make_vbox_dirs(json_topology.get_vboxes(), output_dir, topology_name)

        # Create the qemu working directories
        make_qemu_dirs(json_topology.get_qemus(), output_dir, topology_name)

        if config_err:
            logging.warning('Some router startup configurations could not be '
                            'found to be copied to the new topology')

        if image_err:
            logging.warning('Some images could not be found to be copied to '
                            'the new topology')

        filename = '%s.gns3' % topology_name
        file_path = os.path.join(output_dir, filename)
        with open(file_path, 'w') as file:
            json.dump(json_topology.get_topology(), file, indent=4,
                      sort_keys=True)
            if not snapshot and not quiet:
                print('Your topology has been converted and can found in:\n'
                      '     %s' % output_dir)
    except OSError as error:
        logging.error(error)