def METHOD_NAME(
    script_obj: dict, file_path: str, from_version: Optional[str] = None
):
    """Update the docker image for the passed script object. Will ignore if this is a javascript
    object or using default image (not set).
    Args:
        script_obj (dict): script object
    """
    if script_obj.get("type") == TYPE_JS:
        logger.info(
            "[yellow]Skipping docker image update as this is a Javascript automation.[/yellow]"
        )
        return
    dockerimage = script_obj.get("dockerimage")
    if not dockerimage:  # default image -> nothing to do
        logger.info(
            "[yellow]Skipping docker image update as default docker image is being used.[/yellow]"
        )
        return
    image_name = dockerimage.split(":")[0]
    try:
        if is_iron_bank_pack(file_path):
            latest_tag = DockerImageValidator.get_docker_image_latest_tag_from_iron_bank_request(
                image_name
            )
        else:
            latest_tag = DockerImageValidator.get_docker_image_latest_tag_request(
                image_name
            )
        if not latest_tag:
            logger.info("[yellow]Failed getting docker image latest tag[/yellow]")
            return
    except Exception as e:
        logger.info(
            f"[yellow]Failed getting docker image latest tag. {e} - Invalid docker image[/yellow]"
        )
        return
    full_name = f"{image_name}:{latest_tag}"
    if full_name != dockerimage:
        logger.info(f"Updating docker image to: {full_name}")
        script_obj["dockerimage"] = full_name
        if (not from_version) or server_version_compare("5.0.0", from_version) > 0:
            # if this is a script that supports 4.5 and earlier. Make sure dockerimage45 is set
            if not script_obj.get("dockerimage45"):
                logger.info(
                    f"Setting dockerimage45 to previous image value: {dockerimage} for 4.5 and earlier support"
                )
                script_obj["dockerimage45"] = dockerimage
    else:
        logger.info(
            f"Already using latest docker image: {dockerimage}. Nothing to update."
        )