def update_eval_case(
      self, app_name: str, eval_set_id: str, updated_eval_case: EvalCase
  ):
    """Updates an existing EvalCase give the app_name and eval_set_id.

    Raises:
      NotFoundError: If the eval set or the eval case is not found.
    """
    eval_case_id = updated_eval_case.eval_id

    # Find the eval case to be updated.
    eval_case_to_update = self.get_eval_case(
        app_name, eval_set_id, eval_case_id
    )

    if eval_case_to_update:
      # Remove the eval case from the existing eval set.
      eval_set = self.get_eval_set(app_name, eval_set_id)
      eval_set.eval_cases.remove(eval_case_to_update)

      # Add the updated eval case to the existing eval set.
      eval_set.eval_cases.append(updated_eval_case)

      # Persit the eval set.
      eval_set_file_path = self._get_eval_set_file_path(app_name, eval_set_id)
      self._write_eval_set(eval_set_file_path, eval_set)
    else:
      raise NotFoundError(
          f"Eval Set `{eval_set_id}` or Eval id `{eval_case_id}` not found.",
      )
Updates an existing EvalCase give the app_name and eval_set_id.

    Raises:
      NotFoundError: If the eval set or the eval case is not found.
    
src/google/adk/evaluation/local_eval_sets_manager.py