parameters: (url, generation)
return_statement: return generation
docstring: Decodes a generation from a StorageURL and a generation string.
  
    This is used to represent gs and s3 versioning.
  
    Args:
      url: StorageUrl representing the object.
      generation: Long or string representing the object's generation or
                  version.
  
    Returns:
      Valid generation string for use in URLs.
docstring_summary: Decodes a generation from a StorageURL and a generation string.
docstring_tokens: Decodes a generation from a StorageURL and a generation string .
function: def GenerationFromUrlAndString(url, generation):
    """Decodes a generation from a StorageURL and a generation string.
  
    This is used to represent gs and s3 versioning.
  
    Args:
      url: StorageUrl representing the object.
      generation: Long or string representing the object's generation or
                  version.
  
    Returns:
      Valid generation string for use in URLs.
    """
    if url.scheme == 's3' and generation:
      return _DecodeLongAsString(generation)
    return generation
function_tokens: def GenerationFromUrlAndString ( url , generation ) : if url . scheme == 's3' and generation : return _DecodeLongAsString ( generation ) return generation