code: def _generate_docker_image_version(layers, runtime):
          
  
          # Docker has a concept of a TAG on an image. This is plus the REPOSITORY is a way to determine
          # a version of the image. We will produced a TAG for a combination of the runtime with the layers
          # specified in the template. This will allow reuse of the runtime and layers across different
          # functions that are defined. If two functions use the same runtime with the same layers (in the
          # same order), SAM CLI will only produce one image and use this image across both functions for invoke.
          return runtime + '-' + hashlib.sha256(
              "-".join([layer.name for layer in layers]).encode('utf-8')).hexdigest()[0:25]
docs: Generate the Docker TAG that will be used to create the image
  
          Parameters
          ----------
          layers list(samcli.commands.local.lib.provider.Layer)
              List of the layers
  
          runtime str
              Runtime of the image to create
  
          Returns
          -------
          str
              String representing the TAG to be attached to the image