third_party/updater/chromium_mac_arm64/3pp/fetch.py
def fetch(platform, minimum, minimum_lexographic):
    """
    Queries GCS for versions and returns a tuple (min, max), where min is the
    (numerically) lowest version greater than `minimum` returned by GCS, and
    max is the greatest (lexographically) version returned by GCS. Because GCS
    compares and returns items in lexographic order, GCS may return no eligible
    min items. (For example, if minimum = 200, it could return 30, 31, 32...)
    In this case, min will be float('inf') and the caller should query with max as
    the new minimum_lexographic.
  """
    return functools.reduce(
        lambda a, b: (min(a[0], int(b)) if int_or_inf(b) > minimum else a[0],
                      max(a[1], b)),
        map(
            lambda s: s[len(platform) + 1:-1],
            json.loads(
                six.moves.urllib.request.urlopen(
                    'https://storage.googleapis.com/storage/v1/b/'
                    'chromium-browser-snapshots/o?prefix=%s%%2F&startOffset=%s'
                    '%%2F%s&fields=prefixes&delimiter=%%2F' %
                    (platform, platform,
                     minimum_lexographic)).read())['prefixes']),
        (float('inf'), ''))

    Queries GCS for versions and returns a tuple (min, max), where min is the
    (numerically) lowest version greater than `minimum` returned by GCS, and
    max is the greatest (lexographically) version returned by GCS. Because GCS
    compares and returns items in lexographic order, GCS may return no eligible
    min items. (For example, if minimum = 200, it could return 30, 31, 32...)
    In this case, min will be float('inf') and the caller should query with max as
    the new minimum_lexographic.
  
Queries GCS for versions and returns a tuple (min, max), where min is the
(numerically) lowest version greater than `minimum` returned by GCS, and
max is the greatest (lexographically) version returned by GCS. Because GCS
compares and returns items in lexographic order, GCS may return no eligible
min items. (For example, if minimum = 200, it could return 30, 31, 32...)
In this case, min will be float('inf') and the caller should query with max as
the new minimum_lexographic.
Queries GCS for versions and returns a tuple ( min max ) where min is the ( numerically ) lowest version greater than ` minimum ` returned by GCS and max is the greatest ( lexographically ) version returned by GCS . Because GCS compares and returns items in lexographic order GCS may return no eligible min items . ( For example if minimum = 200 it could return 30 31 32 ... ) In this case min will be float ( ' inf ' ) and the caller should query with max as the new minimum_lexographic .
def fetch(platform, minimum, minimum_lexographic):
    return functools.reduce(
        lambda a, b: (min(a[0], int(b)) if int_or_inf(b) > minimum else a[0],
                      max(a[1], b)),
        map(
            lambda s: s[len(platform) + 1:-1],
            json.loads(
                six.moves.urllib.request.urlopen(
                    'https://storage.googleapis.com/storage/v1/b/'
                    'chromium-browser-snapshots/o?prefix=%s%%2F&startOffset=%s'
                    '%%2F%s&fields=prefixes&delimiter=%%2F' %
                    (platform, platform,
                     minimum_lexographic)).read())['prefixes']),
        (float('inf'), ''))
def fetch ( platform , minimum , minimum_lexographic ) : return functools . reduce ( lambda a , b : ( min ( a [ 0 ] , int ( b ) ) if int_or_inf ( b ) > minimum else a [ 0 ] , max ( a [ 1 ] , b ) ) , map ( lambda s : s [ len ( platform ) + 1 : - 1 ] , json . loads ( six . moves . urllib . request . urlopen ( 'https://storage.googleapis.com/storage/v1/b/' 'chromium-browser-snapshots/o?prefix=%s%%2F&startOffset=%s' '%%2F%s&fields=prefixes&delimiter=%%2F' % ( platform , platform , minimum_lexographic ) ) . read ( ) ) [ 'prefixes' ] ) , ( float ( 'inf' ) , '' ) )
Queries GCS for versions and returns a tuple (min, max), where min is the
(numerically) lowest version greater than `minimum` returned by GCS, and
max is the greatest (lexographically) version returned by GCS.
Queries GCS for versions and returns a tuple ( min max ) where min is the ( numerically ) lowest version greater than ` minimum ` returned by GCS and max is the greatest ( lexographically ) version returned by GCS .
"""
    Queries GCS for versions and returns a tuple (min, max), where min is the
    (numerically) lowest version greater than `minimum` returned by GCS, and
    max is the greatest (lexographically) version returned by GCS. Because GCS
    compares and returns items in lexographic order, GCS may return no eligible
    min items. (For example, if minimum = 200, it could return 30, 31, 32...)
    In this case, min will be float('inf') and the caller should query with max as
    the new minimum_lexographic.
  """
platform
minimum
minimum_lexographic