code: def caption(self) -> Optional[str]:
          
          if "edge_media_to_caption" in self._node and self._node["edge_media_to_caption"]["edges"]:
              return self._node["edge_media_to_caption"]["edges"][0]["node"]["text"]
          elif "caption" in self._node:
              return self._node["caption"]
docs: Caption.