parameters: (device, apk_package, metadata_path)
docstring: Checks if the metadata on the device for apk_package has changed.
docstring_summary: Checks if the metadata on the device for apk_package has changed.
docstring_tokens: Checks if the metadata on the device for apk_package has changed .
function: def HasInstallMetadataChanged(device, apk_package, metadata_path):
    """Checks if the metadata on the device for apk_package has changed."""
    if not os.path.exists(metadata_path):
      return True
  
    with open(metadata_path, 'r') as expected_file:
      return expected_file.read() != device.GetInstallMetadata(apk_package)
function_tokens: def HasInstallMetadataChanged ( device , apk_package , metadata_path ) : if not os . path . exists ( metadata_path ) : return True with open ( metadata_path , 'r' ) as expected_file : return expected_file . read ( ) != device . GetInstallMetadata ( apk_package )