def get_image_for_repo(self, repo: str, branch: str, git_repo: Repo, repo_path: Path):
requirements_option, requirements_hash = self.get_requirements_information(repo_path)<EOL>dependencies = self.get_dependencies()<EOL>logger.info("<STR_LIT>", requirements_option, dependencies)<EOL>image_name = self.get_image_name(repo_path, requirements_option, dependencies)<EOL>image_tag = self.get_image_tag(requirements_option, requirements_hash, dependencies)<EOL>logger.info("<STR_LIT>", image_name, image_tag)<EOL>if self.image_exists(image_name, image_tag):<EOL><INDENT>image = self.get_image(image_name, image_tag)<EOL>if self.use_registry_name is not None and not self.registry_pull_only:<EOL><INDENT>self.push_to_registry(image, image_tag)<EOL><DEDENT>return image<EOL><DEDENT>if self.use_registry_name is not None:<EOL><INDENT>image = self.try_pull_image_from_registry(image_name, image_tag)<EOL>if image is not None:  <EOL><INDENT>return image<EOL><DEDENT><DEDENT>image = self.build_image(image_name, image_tag, repo_path, requirements_option, dependencies)<EOL>if self.use_registry_name is not None and not self.registry_pull_only:<EOL><INDENT>self.push_to_registry(image, image_tag)<EOL><DEDENT>return image<EOL>
Returns an image for the specific repo (based on settings and requirements).

1. Checks if the image already exists locally
2. Tries to pull it from registry (if ``use_registry_name`` is set)
3. Builds the image
4. Pushes the image to registry so the image is available next time (if ``registry_pull_only`` is not set)

See :meth:`run` for parameters descriptions.

:rtype: docker.models.images.Image