code: def build_image_from_inherited_image(self, image_name: str, image_tag: str,
                                           repo_path: Path,
                                           requirements_option: RequirementsOptions):
          
  
          base_name, base_tag = self.get_inherit_image()
  
          if requirements_option == RequirementsOptions.no_requirements:
              image = self.get_image(base_name, base_tag)
              image.tag(image_name, image_tag)  # so ``build_image`` doesn't have to be called next time
  
              return image
  
          dockerfile = self.get_install_requirements_dockerfile(base_name, base_tag, repo_path, requirements_option)
  
          self.get_or_build_image(image_name, image_tag, dockerfile, build_context=repo_path.parent, pull=False)
  
          return self.get_image(image_name, image_tag)
docs: Builds a image with installed requirements from the inherited image. (Or just tags the image
          if there are no requirements.)
  
          See :meth:`build_image` for parameters descriptions.
  
          :rtype: docker.models.images.Image