@contextmanager<EOL><INDENT>def _get_code_dir(self, code_path):<DEDENT>
decompressed_dir = None<EOL>try:<EOL><INDENT>if os.path.isfile(code_path) and code_path.endswith(self.SUPPORTED_ARCHIVE_EXTENSIONS):<EOL><INDENT>decompressed_dir = _unzip_file(code_path)<EOL>yield decompressed_dir<EOL><DEDENT>else:<EOL><INDENT>LOG.debug("<STR_LIT>", code_path)<EOL>yield code_path<EOL><DEDENT><DEDENT>finally:<EOL><INDENT>if decompressed_dir:<EOL><INDENT>shutil.rmtree(decompressed_dir)<EOL><DEDENT><DEDENT>
Method to get a path to a directory where the Lambda function code is available. This directory will
be mounted directly inside the Docker container.

This method handles a few different cases for ``code_path``:
    - ``code_path``is a existent zip/jar file: Unzip in a temp directory and return the temp directory
    - ``code_path`` is a existent directory: Return this immediately
    - ``code_path`` is a file/dir that does not exist: Return it as is. May be this method is not clever to
        detect the existence of the path

:param string code_path: Path to the code. This could be pointing at a file or folder either on a local
    disk or in some network file system
:return string: Directory containing Lambda function code. It can be mounted directly in container