def METHOD_NAME(self) -> None:
    """Build function image and save it in self._image_name"""
    if self._application_build_result:
        LOG.debug("Using pre-built resources for function %s", self._function_identifier)
        self._use_prebuilt_resources(self._application_build_result)
    else:
        LOG.debug("Building function from scratch %s", self._function_identifier)
        self._build_resources_from_scratch()
    if self._image_name:
        self._local_sha = self._get_local_image_id(self._image_name)