def METHOD_NAME(keyfile, hoststring):
    scripts_dir = '/root/scripts/'
    templates_dir = '/root/templates/'
    conn.run('mkdir -p /tmp/{}/'.format(args.cluster_name))
    conn.put(templates_dir + 'notebook_spark-defaults_local.conf',
        '/tmp/{}/notebook_spark-defaults_local.conf'.format(args.cluster_name))
    spark_master_ip = args.spark_master.split('//')[1].split(':')[0]
    spark_memory = get_spark_memory(True, args.os_user, spark_master_ip, keyfile)
    conn.run('echo "spark.executor.memory {0}m" >> /tmp/{1}/notebook_spark-defaults_local.conf'.format(spark_memory,
                                                                                                  args.cluster_name))
    if not exists(conn,'/usr/local/bin/rstudio_dataengine_create_configs.py'):
        conn.put(scripts_dir + 'rstudio_dataengine_create_configs.py', '/tmp/rstudio_dataengine_create_configs.py')
        conn.sudo('cp -f /tmp/rstudio_dataengine_create_configs.py /usr/local/bin/rstudio_dataengine_create_configs.py')
        conn.sudo('chmod 755 /usr/local/bin/rstudio_dataengine_create_configs.py')
    if not exists(conn,'/usr/lib/python3.8/datalab/'):
        conn.sudo('mkdir -p /usr/lib/python3.8/datalab/')
        conn.local('cd  /usr/lib/python3.8/datalab/; tar -zcvf /tmp/datalab.tar.gz *')
        conn.put('/tmp/datalab.tar.gz', '/tmp/datalab.tar.gz')
        conn.sudo('tar -zxvf /tmp/datalab.tar.gz -C /usr/lib/python3.8/datalab/')
        conn.sudo('chmod a+x /usr/lib/python3.8/datalab/*')
        if exists(conn, '/usr/lib64'):
            conn.sudo('mkdir -p /usr/lib64/python3.8')
            conn.sudo('ln -fs /usr/lib/python3.8/datalab /usr/lib64/python3.8/datalab')