code: def build_image_from_path(self, path, image, use_cache=False, remove_im=True):
          
          logger.info("building image '%s' from path '%s'", image, path)
          response = self.d.build(path=path, tag=image.to_str(),
                                  nocache=not use_cache, decode=True,
                                  rm=remove_im, forcerm=True, pull=False)  # returns generator
          return response
docs: build image from provided path and tag it
  
          this operation is asynchronous and you should consume returned generator in order to wait
          for build to finish
  
          :param path: str
          :param image: ImageName, name of the resulting image
          :param stream: bool, True returns generator, False returns str
          :param use_cache: bool, True if you want to use cache
          :param remove_im: bool, remove intermediate containers produced during docker build
          :return: generator