<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_config_drive(network_interface_info, os_version):
 """Generate config driver for zVM guest vm. :param dict network_interface_info: Required keys: ip_addr - (str) IP address nic_vdev - (str) VDEV of the nic gateway_v4 - IPV4 gateway broadcast_v4 - IPV4 broadcast address netmask_v4 - IPV4 netmask :param str os_version: operating system version of the guest """

    temp_path = CONF.guest.temp_path
    if not os.path.exists(temp_path):
        os.mkdir(temp_path)
    cfg_dir = os.path.join(temp_path, 'openstack')
    if os.path.exists(cfg_dir):
        shutil.rmtree(cfg_dir)
    content_dir = os.path.join(cfg_dir, 'content')
    latest_dir = os.path.join(cfg_dir, 'latest')
    os.mkdir(cfg_dir)
    os.mkdir(content_dir)
    os.mkdir(latest_dir)

    net_file = os.path.join(content_dir, '0000')
    generate_net_file(network_interface_info, net_file, os_version)
    znetconfig_file = os.path.join(content_dir, '0001')
    generate_znetconfig_file(znetconfig_file, os_version)
    meta_data_path = os.path.join(latest_dir, 'meta_data.json')
    generate_meta_data(meta_data_path)
    network_data_path = os.path.join(latest_dir, 'network_data.json')
    generate_file('{}', network_data_path)
    vendor_data_path = os.path.join(latest_dir, 'vendor_data.json')
    generate_file('{}', vendor_data_path)

    tar_path = os.path.join(temp_path, 'cfgdrive.tgz')
    tar = tarfile.open(tar_path, "w:gz")
    os.chdir(temp_path)
    tar.add('openstack')
    tar.close()

    return tar_path