def get_arcpy():
install_dir = locate_arcgis()  <EOL>arcpy = path.join(install_dir, "<STR_LIT>")<EOL>if not path.exists(arcpy):<EOL><INDENT>raise ImportError("<STR_LIT>".format(install_dir))<EOL><DEDENT>bin_dir = path.join(install_dir, "<STR_LIT>")<EOL>is_64bits = sys.maxsize > <NUM_LIT:2>**<NUM_LIT:32><EOL>if not path.exists(bin_dir) or is_64bits == False:<EOL><INDENT>bin_dir = path.join(install_dir, "<STR_LIT>")<EOL><DEDENT>scripts = path.join(install_dir, "<STR_LIT>", "<STR_LIT>")  <EOL>sys.path.extend([arcpy, bin_dir, scripts])<EOL>
Allows arcpy to imported on 'unmanaged' python installations (i.e. python installations
arcgis is not aware of).
Gets the location of arcpy and related libs and adds it to sys.path