def build_event(author: str, parts_content: list[dict]) -> Event:
  """Builds an Event object with specified parts."""
  parts = []
  for p_data in parts_content:
    part_args = {}
    if "text" in p_data:
      part_args["text"] = p_data["text"]
    if "func_name" in p_data:
      part_args["function_call"] = types.FunctionCall(
          name=p_data.get("func_name"), args=p_data.get("func_args")
      )
    # Add other part types here if needed for future tests
    parts.append(types.Part(**part_args))
  return Event(author=author, content=types.Content(parts=parts))
Builds an Event object with specified parts.
tests/unittests/cli/utils/test_evals.py