code: def _join_citation_metadatas(
      citation_metadatas: Iterable[glm.CitationMetadata],
  ):
      citation_metadatas = list(citation_metadatas)
      return citation_metadatas[-1]
  
imports: from __future__ import annotations
  import collections
  import contextlib
  import sys
  from collections.abc import Iterable, AsyncIterable
  import dataclasses
  import itertools
  import textwrap
  from typing import TypedDict, Union
  import google.protobuf.json_format
  import google.api_core.exceptions
  from google.ai import generativelanguage
  from google.generativeai import string_utils
label_desc: Use image node_id 2 for calling a global function with example usage: _join_citation_metadatas(citation_metadatas) and returns: citation_metadatas