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

def _get_code_dir(self, code_path):
        """
        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
        """

        decompressed_dir = None

        try:
            if os.path.isfile(code_path) and code_path.endswith(self.SUPPORTED_ARCHIVE_EXTENSIONS):

                decompressed_dir = _unzip_file(code_path)
                yield decompressed_dir

            else:
                LOG.debug("Code %s is not a zip/jar file", code_path)
                yield code_path
        finally:
            if decompressed_dir:
                shutil.rmtree(decompressed_dir)