def METHOD_NAME(plist, bundle_id, uuid):
  """Patches the plist dictionary with bundle_id:uuid."""
  try:
    profiles = plist["provisioningProfiles"]
    profiles[bundle_id] = uuid
  except (TypeError, KeyError):
    raise ValueError(
        "Plist not in correct format. 'provisioningProfiles' misplaced?")