def MakeCreateComparisonKey(name_re):

    def CreateComparisonKey(image):
        version = int(re.match(name_re, image.name).group(1))
        timestamp = times.ParseDateTime(image.creationTimestamp)
        return (version, timestamp)
    return CreateComparisonKey
def MakeCreateComparisonKey(name_re):

    def CreateComparisonKey(image):
        version = int(re.match(name_re, image.name).group(1))
        timestamp = times.ParseDateTime(image.creationTimestamp)
        return (version, timestamp)
    return CreateComparisonKey