def nodejs_lambda(code):
directory = tempfile.mkdtemp()<EOL>filename = os.path.join(directory, "<STR_LIT>")<EOL>with open(filename, "<STR_LIT>") as fp:<EOL><INDENT>fp.write(code)<EOL>fp.flush()<EOL><DEDENT>return os.path.realpath(directory)<EOL>
In a temporary directory, create "index.js" file with the passed in code and return directory path.
This is a contextmanager. So it can be used inside `with` statements to automatically cleanup
temp folder upon exit

:param string code: Code to be written to the index.js file
:return string: directory path